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

Re: Math With Big Numbers

by danaj (Friar)
on Mar 26, 2019 at 23:20 UTC ( [id://1231723]=note: print w/replies, xml ) Need Help??


in reply to Math With Big Numbers

For fun on the quadmath perl I use:

$ perl -V | grep nvsize nvsize=16 $ perl -E 'say 6**25; say ~0' 28430288029929701376 18446744073709551615

Quadmath works in this case, but of course you really want to use bigint, Math::BigInt, Math::GMP, Math::GMPz, etc. as this is just putting it off (e.g. 6^42 is exact but 6^43 is not).

Log In?
Username:
Password:

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

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

    No recent polls found