[erlang-questions] math:pow(X, Y).
Yves S. Garret
yoursurrogategod@REDACTED
Mon Mar 19 18:17:08 CET 2012
Hi all,
That's the standard method that I use to raise a value to a power. I
compared this to the way Python does raising to a power and this is the
result that I get:
Erlang:
11> math:pow(42, 909).
** exception error: bad argument in an arithmetic expression
in function math:pow/2
called as math:pow(42,909)
Python:
http://bin.cakephp.org/view/1006418268
Now. Why is it in Erlang's case I get a float as a return value? Is there
a method that only returns a long? Or do most erlang coders have a custom
power function if they want ridiculously large numbers?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20120319/5223cc91/attachment.htm>
More information about the erlang-questions
mailing list