[erlang-questions] Maths Problem -> 2452.45*100. = 245244.99999999997
aman mangal
mangalaman93@REDACTED
Wed Nov 27 02:34:23 CET 2013
Hi,
I guess it is because of floating point arithmetic not specific to erlang.
see this http://www.erlang.org/faq/problems.html#id56586
Aman Mangal
4th year Undergraduate Student
Department of Computer Science & Engineering
IIT Bombay
www.cse.iitb.ac.in/~amanmangal
On Wed, Nov 27, 2013 at 6:58 AM, Sanath Prasanna <ahe.sanath@REDACTED>wrote:
> Hi all,
> when running following sample in ERL shell, I got wrong value. What is the
> reason for this?
>
> 2452.45*100. = 245244.99999999997
>
> It should be 245245.0 or 245245
>
>
> Then all the calculations became wrong in my program.
> Are there any idea regarding above?
>
> Br,
> Sanath
>
> _______________________________________________
> erlang-questions mailing list
> erlang-questions@REDACTED
> http://erlang.org/mailman/listinfo/erlang-questions
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20131127/1d51a617/attachment.htm>
More information about the erlang-questions
mailing list