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 <[email protected]
<mailto:[email protected]>> 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.
_______________________________________________
Haskell-Cafe mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/haskell-cafe