Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Mathematical rounding
Message
From
31/01/2005 13:23:19
 
 
To
31/01/2005 13:07:39
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00982326
Message ID:
00982350
Views:
25
german highschool (if i remember correctly). are you saying it's wrong? if so, then how come the result is correct/matches.

you wanna give me the 'correct' answer then?


>Where in the heck have you learnt this? I have many years in school of very advanced math, and I have never heard anything like your theory. You must have dreamt this?
>
>>>Hi to all,
>>>
>>>Here is the controversy:
12.345   -> 12.3
>>>         -> 12.4
In my opinion, the first one (12.3) is the correct 'mathematical rounding' (to 1 decimal here). However, some colleagues say the second one is correct.
>>>
>>>Please, tell me that I'm correct! ;)
>>
>>
>>sorry, but you are incorrect.
>>
>>roundiung starts at the very end. therefore, the 5 gets rounded up, changing the 4 into a five.
>>
>>since the 4 is a 5 now, this one gets rounded up making out of the 3 a 4.
>>
>>so you end up with 12.4
>>
>>if you limit the round() function to how many decimals it is supposed to look at the result will change.
>>
>>?round(12.345, 1) = 12.3 because the function ignores the 5
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform