Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re: Comparing results of math operations

by Anonymous Monk
on Apr 16, 2014 at 12:11 UTC ( #1082493=note: print w/ replies, xml ) Need Help??


in reply to Comparing results of math operations

Floating-point number like little pile of sand on the ground. Each time you pick it up and move it around, you lose a little sand (precision) and pick up a little dirt (error). Rounding and such masks this effect but does not get rid of it. Add up enough numbers and you will see (to the vexation of your accountant) that the total at the bottom is "off by a few cents." In fact, the total is correct, because it is the sum of non-rounded numbers, whereas the check performed by the calculator-toting accountant is the sum of rounded numbers.


Comment on Re: Comparing results of math operations

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1082493]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others imbibing at the Monastery: (10)
As of 2014-10-24 18:16 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    For retirement, I am banking on:










    Results (134 votes), past polls