[erlang-questions] math:pow(X, Y).

Richard O'Keefe ok@REDACTED
Tue Mar 20 02:38:40 CET 2012


On 20/03/2012, at 6:29 AM, Bob Ippolito wrote:

> In general the math library is for float arithmetic, just like in C. My guess is that the time when this was written, there was no bignum support.

No, it's just that it is *supposed* to be a wrapper for C's pow(),
which always answers doubles.  It would be no bad thing to have
the raise-to-an-integer-power function as a standard thing in
Erlang/OTP, but it would be quite a bad thing to put it in the
math: module.  Is there any reason not to have a '**' operator in
the language?

I'd write an EEP for this, but now that you have to use Markdown,
I can't write EEPs any more.






More information about the erlang-questions mailing list