[Haskell-cafe] about integer and float operations
Manlio Perillo
manlio_perillo at libero.it
Wed Feb 4 17:10:44 EST 2009
Yitzchak Gale ha scritto:
> Manlio Perillo wrote:
>> No.
>> I'm looking for...
>
> Manlio - can you describe exactly what you want?
> Do you know exactly what you want?
>
> You have said that you want division like in Python -
> but that even that is not well defined:
>
> Python 2.6.1
>>>> 3/5
> 0
>
You have to:
from __future__ import division
In Python 3.x this is now the default behaviour
> Python 3.1
>>>> 3/5
> 0.59999999999999998
>
> Please tell us *exactly* what you want your division to
> do, on integers and on floating point.
I'm posting more details in another response.
Thanks Manlio Perillo
More information about the Haskell-Cafe
mailing list