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

Re: Is this odd behavior a floating point problem?

by Eliya (Vicar)
on Mar 23, 2012 at 17:14 UTC ( [id://961266]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    $ perl -e '$x=0.001; $sum += $x for 1..40; printf "%.20f", $sum/40'
    0.00100000000000000067
    
  2. or download this
    $ perl -e '$x=0.001; $sum += $x for 0..40; printf "%.20f", $sum/40'
    0.00102500000000000074
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others learning in the Monastery: (6)
As of 2024-04-19 03:08 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found