[erlang-questions] Limits on integer size

Bjorn Gustavsson bgustavsson@REDACTED
Tue Aug 26 09:18:23 CEST 2008

On Tue, Aug 26, 2008 at 8:56 AM, Imre Palik <imre@REDACTED> wrote:

> But if I decrease the size of HN to let's say 100 digits, then it works
> without any problem.
> Could somebody tell me the limitations that I have with integers in erlang?
>  Is it possible to tune these somehow (config file, environment variable,
> etc.)?

The problem is not integer limits, but floating point limits.

random:uniform(N) first generates a floating point number between 0 and 1,
then multiplies it by N. The result is too big to be represented
as a floating point number.


Björn Gustavsson, Erlang/OTP, Ericsson AB
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20080826/cc3c5a6b/attachment.htm>

More information about the erlang-questions mailing list