[Haskell-cafe] Difference between div and /
Jonas Almström Duregård
jonas.duregard at gmail.com
Tue Jun 1 16:40:51 EDT 2010
>> 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...
/J
On 1 June 2010 21:08, Daniel Fischer <daniel.is.fischer at web.de> wrote:
> On Tuesday 01 June 2010 20:26:55, Jonas Almström Duregård wrote:
>> One might expect a == (a/b)*b and other common arithmetic formulas to
>> hold for division?
>>
>> /Jonas
>
> Better not if one's using Float or Double.
>
More information about the Haskell-Cafe
mailing list