<div dir="ltr"><div>>>Unfortunately, decimal does not solves all problems.</div><div><br></div><div>I do not want to be sarcastic, but it is really hard to divide 100 dollars between three guys, </div><div>give them all the same amount (100/3) and then say "Sorry, I need my money back". </div>
<div>Do you think you will have 100 dollars then?</div><div><br></div><div>You need to decide what precision is right for you (specifically when you ared dividing), how to correctly round and so on. There is a whole mathematics about it.</div>
<div><br></div><div>You need to determine needed precision. </div><div>Sometimes the value 3.14 is good, but sometimes the value 3,14159265358979323846 is not good enough...</div><div><br></div><div>Decimals do solve problems if you know needed precision. </div>
<div><br></div><div>In financials you need to calculate millions and billions with a precision to cents.</div><div><br></div><div>And - for example - for US Debt ( <a href="http://www.usdebtclock.org/" target="_blank">http://www.usdebtclock.org/</a> ) you need 16 digits (trillions) if you want to be accurate to cents right now. :-)</div>
<div>Imagine to express US Debt in Japanese Yen :-)</div><div><br></div><div>Regards,</div><div>Bob</div><div> </div><div><br></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">2013/11/27 Anthony Ramine <span dir="ltr"><<a href="mailto:n.oxyde@gmail.com" target="_blank">n.oxyde@gmail.com</a>></span><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">This looks like a bug in decimal though, this time.<br>
<span class="HOEnZb"><font color="#888888"><br>
--<br>
Anthony Ramine<br>
<br>
Le 27 nov. 2013 à 14:37, Alexander Alexeev <<a href="mailto:mail@eax.me">mail@eax.me</a>> a écrit :<br>
</font></span><div class="im HOEnZb"><br>
> Unfortunately, decimal does not solves all problems.<br>
<br>
</div><div class="HOEnZb"><div class="h5">_______________________________________________<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>
</div></div></blockquote></div><br></div>