[EMAIL PROTECTED] reports the following problem.

Version:       1.4 
OS:             
compiler:       
configuration:  
Expected behaviour:
The value of the expression 
1.2 :: Rational
should be exactly 6 % 5.
Observed behaviour:
However, apparently hugs represents the literal 1.2 first 
by a floating point value, which is then approximated by
a rational number, thus introducing unnecessary round-off 
error. This is the behaviour one should (and does) get from
the expression
toRational 1.2


Transcript:
Prelude> 1.2 :: Rational
5033165 % 4194304
Prelude> toRational 1.2
5033165 % 4194304

Code:



Reply via email to