Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re^3: Efficiently working with huge exponents (yeah)

by wanna_code_perl (Friar)
on Mar 21, 2015 at 13:55 UTC ( [id://1120841]=note: print w/replies, xml ) Need Help??


in reply to Re^2: Efficiently working with huge exponents (yeah)
in thread Efficiently working with huge exponents

Thanks to you both. While I'll probably just use Math::BigApprox for my current need, re-learning a little math never hurt anyone (much).

  • Comment on Re^3: Efficiently working with huge exponents (yeah)

Replies are listed 'Best First'.
Re^4: Efficiently working with huge exponents (yeah)
by syphilis (Archbishop) on Mar 22, 2015 at 01:14 UTC
    ... I'll probably just use Math::BigApprox for my current need ...

    When the original post first appeared, I didn't notice any mention of perfect precision *not* being desired. Was that part of the post always there ?
    Anyway, just to correct my original reply to cater for perfect precision *not* being required:
    perl -MMath::MPFR=:mpfr -le "Rmpfr_set_default_prec(28);print Math::MP +FR->new(2) ** 1024000;" 5.194693363e308254
    (In Math::MPFR, precision is specified in bits.)

    You *can* specify precision for your Math::BigFloat numbers, too - it's in the docs.

    Cheers,
    Rob
      When the original post first appeared, I didn't notice any mention of perfect precision *not* being desired. Was that part of the post always there ?

      Yes it was, and if it wasn't, I'd have clearly annotated the change.

      Thanks for the updated tip!

Log In?
Username:
Password:

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

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

    No recent polls found