[erlang-questions] In Erlang , {1.1*1.1.} show me the answer is 1.2100000000000002, why?

Thomas Lindgren thomasl_erlang@REDACTED
Sun Oct 26 11:35:36 CET 2014

Eric, it might be useful to read this: 
CiteSeerX — What Every Computer Scientist Should Know About Floating Point Arithmetic

I know I liked it.

     On Sunday, October 26, 2014 9:35 AM, 张栋 <zd2559@REDACTED> wrote:

 Hello the maillist member:
I am  new in Erlang,Please Help me.

When I try some multiplication, I got the some unexpected answer about the following expression.

Please help!


23> [1.1*1.1,1.1*1.2,1.1*1.3,1.1*1.4,1.1*1.5].

24> [1.2*1.2,1.2*1.3,1.2*1.4,1.2*1.5,1.2*1.6].

Thank you for your time.

Eric D. Zhang In China.

erlang-questions mailing list

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20141026/21f113ab/attachment.htm>

More information about the erlang-questions mailing list