Boost logo

Boost Users :

Subject: Re: [Boost-users] multiprecision (/sandbox/big_number/) - pow function
From: John Maddock (boost.regex_at_[hidden])
Date: 2012-05-11 13:53:05


> Different invocations of pow with the arbitrary precision argument as
> the base, exponent, or both yield different compiler errors, but all
> of them seem to be broken. Am I doing something wrong? Is there some
> other fast way to achieve exponentiation with this library?

Well it took longer than I expected, but:

* Calling an unsupported function now yields an error earlier without the
horrid backtrace.
* The functions pow and powm (modular exponentiation) are now supported for
integer types - the former requires an unsigned integer for the exponent and
is probably dangerous (too easy to create values that take "forever" to
compute), while the latter is safe and accepts both integers and
multiprecision types for the exponent and modulus.

HTH, John.


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net