Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Mathematical rounding
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00982326
Message ID:
00982781
Vues:
35
>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! ;)

Wow, many arguments for something so simple :)

The rule in plain word is simply "round up if the remainder is greater or egal to the half of the last significant unit"
Is 0.045 greater or egal to 0.05? No, so the correct answer is 12.3.


You are correct :)
If we exchange an apple, we both get an apple.
But if we exchange an idea, we both get 2 ideas, cool...


Gérald Santerre
Independant programmer - internet or intranet stuff - always looking for contracts big or small :)
http://www.siteintranet.qc.ca
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform