Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re: expected 0 not result gotten

by sundialsvc4 (Abbot)
on Dec 22, 2011 at 10:03 UTC ( #944746=note: print w/replies, xml ) Need Help??


in reply to expected 0 not result gotten

Wise Man Say:   “Floating point numbers like little piles of sand.   Each time you pick one up and move it around, you lose a little sand and pick up a little dirt.”

Replies are listed 'Best First'.
Re^2: expected 0 not result gotten
by ikegami (Patriarch) on Dec 22, 2011 at 20:38 UTC

    Except that's not quite true. Each time you pick one up and move it around, you may lose a little sand. "Sand" is only lost when the number has a huge (>53) number of digits in binary.

    This usually happens because of the use of numbers that are periodic in binary; they have an infinite number of digits. The OP used 425/10000 and 25/10000 which are both periodic in binary (like 1/3 is in decimal).

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others wandering the Monastery: (6)
As of 2022-08-11 16:44 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?