
1 Jun
2010
1 Jun
'10
5:18 p.m.
On Tue, 2010-06-01 at 22:40 +0200, Jonas Almström Duregård wrote:
One might expect a == (a/b)*b and other common arithmetic formulas to hold for division?
Better not if one's using Float or Double.
I figured someone would say that :)
What about this one: round (a/b/c) == round (a/(b*c))
Of course this doesn't work on Integers...
Hmm. C, Java & co.[1] seems to not have this problem. Also having common division operator is well - useful. I don't think it would create much confusion. At least no more than IEEE standard. [1] By co I mean Ruby, Python, Perl and others. There are no so many languages that do recognize the difference.