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

Re: The Exponentiation of (not-so) Large Primes

by hiseldl (Priest)
on Oct 02, 2002 at 14:42 UTC ( [id://202289]=note: print w/replies, xml ) Need Help??


in reply to The Exponentiation of (not-so) Large Primes

If you look at the source of Math::BigInt.pm, you will find
'**' => sub {new Math::BigInt $_[2]? bpow($_[1],${$_[0]}) : bpow(${$_[0]},$_[1])},
in the operator overload section. This is the operation that I used in a project where I did about the same thing as you are doing.

The docs don't show **, but you should still be able to use it, because it's in the code. Or, you can call bpow(arg1, arg2) directly. :)

--
hiseldl
What time is it? It's Camel Time!

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others romping around the Monastery: (3)
As of 2024-04-24 05:19 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found