Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re^3: Variables are automatically rounded off in perl (humans)

by syphilis (Archbishop)
on Jul 22, 2016 at 01:43 UTC ( [id://1168304]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    C:\>perl -le "print sqrt(3);"
    1.73205080756888
    
    C:\>perl -le "print 'WTF' if 1.73205080756888 != sqrt(3);"
    WTF
    
  2. or download this
    C:\>perl -le "printf '%.16e', 1/100"
    1.0000000000000000e-002
    C:\>perl -le "printf '%.17e', 1/100"
    1.00000000000000002e-002
    
  3. or download this
    C:\>perl -le "printf '%.16e', 0.1"
    1.0000000000000001e-001
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others imbibing at the Monastery: (5)
As of 2024-04-16 06:22 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found