Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery

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?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1082493]
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others perusing the Monastery: (6)
As of 2018-07-19 21:47 GMT
Find Nodes?
    Voting Booth?
    It has been suggested to rename Perl 6 in order to boost its marketing potential. Which name would you prefer?

    Results (420 votes). Check out past polls.