Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

rotarypower101

macrumors 6502
Original poster
Sep 28, 2007
264
4
Portland Oregon
I apologize in advance if I am not defining the question clearly, I will clarify as needed.


Say I am somewhere inbetween this set of numbers, and I would like to know which to choose based on a output with a decimal, how would I direct numbers to change the output to one of the given integers in this set?

178, 175, 172,170,168,165,162,160,158,155,153


So say I receive a 161.01, but I want numbers to choose the nearest lower integer in the set. 161.05 reads 160.



And on to a more difficult permutation of this...
I would ultimately like it to also recommend the lower integer, and also make a estimation/recommendation in 20% increments (a position of 1-5)between the two closest integers

So 161.05 is between 160,162, would be integer 160, with a recommendation of position 3 of 5

160.01≤160.40 would be integer 160, with a recommendation of position 1 of 5
160.41≤160.80 would be integer 160, with a recommendation of position 2 of 5
160.81≤161.20 would be integer 160, with a recommendation of position 3 of 5
161.21≤161.60 would be integer 160, with a recommendation of position 4 of 5
161.61≤162.00 would be integer 160, with a recommendation of position 5 of 5
162.01≤162.40 would be integer 162, with a recommendation of position 1 of 5
...
...
...

Am I defining the question correctly?
can I clarify the request with more detail or explanation?

TIA!
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.