[Haskell-cafe] 9.3 - (2 * 4.5) => 0.3000000000000007
David Turner
d.turner at tracsis.com
Wed Jan 16 15:56:25 CET 2013
On 16/01/2013 13:55, Tom Davie wrote:
> Prelude> import Data.Ratio
> Prelude Data.Ratio> 93 % 10 - (2 * 9 % 2)
> 3 % 10
Or even just a type annotation:
Prelude> (9.3 - (2 * 4.5)) :: Rational
3 % 10
> On 16 Jan 2013, at 13:25, ivan dragolov <ivan at dragolov.net
> <mailto:ivan at dragolov.net>> wrote:
>
>>
>> 9.3 - (2 * 4.5) => 0.3000000000000007
>>
>> I expected 0.3
--
David Turner
Senior Consultant
Tracsis PLC
Tracsis PLC is a company registered in
England and Wales with number 5019106.
More information about the Haskell-Cafe
mailing list