[erlang-questions] floating point exception when accuracy exceeds limit
Tue Jan 20 12:09:00 CET 2015
Largest possible floating-point number with double precision is
On 01/20/2015 11:26 AM, Johan Montelius wrote:
> This might be no news to anyone who is doing a lot of floating point
> arithmetics but it made me scratch my head.
> 7> (6.0e150*6.0e150).
> 8> (6.0e154*6.0e154).
> ** exception error: an error occurred when evaluating an arithmetic
> in operator */2
> called as 6.0e154 * 6.0e154
> Hmm, would it not be better to answer with the highest possible accuracy?
More information about the erlang-questions