Information générale
Catégorie:
COM/DCOM et OLE Automation
Versions des environnements
>With ANY decimal numbers you will have some rounding errors. Sometimes the programs masks the error, and you get the result you want, and sometimes you get the wrong value, there's simply no way to avoid that. You can calculate with a million decimals and minimize the error, but you simply can not eliminate it. Everyone knows that (1/3)*3=1, but still all the calculators and programs I have seen shows 0.99999. In practice it's the same problem, it's only easier to see it.
>
now that one i can understand:
even though i agree that 3 thirds equal 1, but the conputer must work with 1/3 differently. it needs to break it down into 1:3 (as we write in germany), which comes out to 0.3333333 (endless).
now if you multiply this by 3 it will never be 1 - it should always be 0.9999999 (endless).
but i am sure some math-dude can explain exacly how this is. <s>
Précédent
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement