Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re: IEEE-754 calculation - best way?

by BrowserUk (Pope)
on Jan 30, 2013 at 22:40 UTC ( #1016169=note: print w/ replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    print 0.29 * 50;;
    14.5
    
  2. or download this
    printf "%.20f\n", 0.29 * 50;;
    14.49999999999999800000
    
  3. or download this
    printf "%.20f\n",  eval eval( 0.29 ) * eval( 50 );;
    14.50000000000000000000
    
  4. or download this
    printf "%.20f\n",  eval 0.29 * 50;;
    14.50000000000000000000
    
  5. or download this
    $n = 0.29 * 50; printf "%.20f\n",  "$n";;
    14.50000000000000000000
    

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others wandering the Monastery: (10)
As of 2014-07-22 21:49 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (129 votes), past polls