-- -- Rationals vs. Floating points -- test1 :: Rational-> Rational -> Rational test1 x y = 5*(x-y) - 5*x + 5*y test2 :: Float -> Float -> Float test2 x y = 5*(x -y) - 5*x + 5*y -- To test, try these: -- test1 (-0.345) (0.456) --> 0 % 1 i.e. zero -- test2 (-0.345) (0.456) --> -2.38419e-07