Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re: What causes NaN when using bignum

by tune (Curate)
on May 25, 2011 at 12:19 UTC ( #906641=note: print w/ replies, xml ) Need Help??


in reply to What causes NaN when using bignum

$ perl -v|grep "This is perl" This is perl, v5.10.1 (*) built for i686-linux-thread-multi $ uname -i -o -r 2.6.9-89.0.2.EL.msdw.1largesmp x86_64 GNU/Linux $ perl -Mbignum -e '$number=330978816.3082480433473810957254665863937; +$number=(int(((log($number)/log(10))*10)+0.5))/10;print"$number\n";' 8.5

--
tune


Comment on Re: What causes NaN when using bignum
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others exploiting the Monastery: (7)
As of 2015-07-29 22:12 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (269 votes), past polls