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

Re^3: Multiply with 100 in perl

by Anonymous Monk
on Nov 12, 2015 at 01:39 UTC ( [id://1147526]=note: print w/replies, xml ) Need Help??


in reply to Re^2: Multiply with 100 in perl
in thread Multiply with 100 in perl

Bignum is good, but printf still converts to float.

$ perl -Mbignum -e 'printf "%.32g\n", 75.600 * 10**30' 75599999999999995986368094273536 $ perl -Mbignum -le 'print 75.600 * 10**30' 75600000000000000000000000000000

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others pondering the Monastery: (4)
As of 2024-04-18 22:46 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found