Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Mathematical rounding
Message
 
 
To
31/01/2005 14:13:55
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00982326
Message ID:
00982409
Views:
50
Gunnar,

No you don't round in two steps, it's done in one step.

I "think" what Tore is showing is the result of rounding the base value to either 2 digits OR 1 digit.

Peter is right in his original post.

>well now, isn't that exactly what i said only in different words? you round in 2 steps, thats 2 what i am doing, you start at the end (rounding the last digit/decimal), then you round the 2nd last digit of the result from the first rounding, etc etc.
>
>and the magic number is 5 - i also explained that in my original post.
>
>thats exactly what i described - only in different words. so, you wanna explain to me again where i was wrong? <s>
>
>
>
>>Last digit < 5 means round down, digit >= 5 round up. And you do it only once, if you understand what I mean. You always look at the base, not an intermediate answer.
>>
>>Base 2 digit 1 digit
>>1.344 1.34 1.3
>>1.345 1.35 1.3
>>1.346 1.35 1.3
>>1.347 1.35 1.3
>>1.348 1.35 1.3
>>1.349 1.35 1.3
>>1.350 1.35 1.4
>>
df (was a 10 time MVP)

df FoxPro website
FoxPro Wiki site online, editable knowledgebase
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform