[Haskell-cafe] Which one is right?

Daniel Fischer daniel.is.fischer at web.de
Wed Jun 24 15:38:35 EDT 2009

Am Mittwoch 24 Juni 2009 21:05:50 schrieb Thomas Davie:
> This looks like Hugs defaulting to a different type to ghci,
> specifically, Hugs is defaulting to one of the high precission types
> like CReal or Rational, while ghci is defaulting to Float or Double.
> Bob

No, hugs is displaying with fewer digits of precision, so the round for display gives 
0.x000000 which is abbreviated to 0.x, ghci displays with more digits, so the floating 
point inexactness shows in the last digit.

Prelude> sin 2
Hugs> sin 2

More information about the Haskell-Cafe mailing list