<div dir="ltr">Because of the principle how floating point numbers work. Encoded number is approximate, so that 0.0000000002 is just closest representation in binary that would encode your given fraction (1.21), and it is below the precision which is guaranteed for this size of floating point value. This question been discussed million times for every programming language.<br><br><a href="http://en.wikipedia.org/wiki/IEEE_floating_point">http://en.wikipedia.org/wiki/IEEE_floating_point</a> (there is chinese variant of this article, hope its detailed enough).<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Sun, Oct 26, 2014 at 8:24 AM, 张栋 <span dir="ltr"><<a href="mailto:zd2559@126.com" target="_blank">zd2559@126.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="line-height:1.7;color:#000000;font-size:14px;font-family:Arial"><div>Hello the maillist member:<br>I am  new in Erlang,Please Help me.<br><br>When I try some <span>multiplication, I got the some</span><span> unexpected</span><span> answer</span><span> about the following expression.<br><br>Please help!<br><br>List:<br><br></span>23> [1.1*1.1,1.1*1.2,1.1*1.3,1.1*1.4,1.1*1.5].<br>[1.2100000000000002,1.32,1.4300000000000002,1.54,<br> 1.6500000000000001]<br><br>24> [1.2*1.2,1.2*1.3,1.2*1.4,1.2*1.5,1.2*1.6].<br>[1.44,1.56,1.68,1.7999999999999998,1.92]<br><br>Thank you for your time.<br><br>Eric D. Zhang In China.<br><br><span></span></div></div><br><br><span title="neteasefooter"><span></span></span><br>_______________________________________________<br>
erlang-questions mailing list<br>
<a href="mailto:erlang-questions@erlang.org">erlang-questions@erlang.org</a><br>
<a href="http://erlang.org/mailman/listinfo/erlang-questions" target="_blank">http://erlang.org/mailman/listinfo/erlang-questions</a><br>
<br></blockquote></div><br></div>