recip bug?!

Robert Reitmeier 3t at thinking-machines.net
Sun Nov 23 14:21:09 EST 2003


HUGS says:

> Main> :version
> -- Hugs Version December 2001
> Main> (-1)%1
> -1 % 1
> Main> recip ((-1)%1)
> 1 % -1
> Main> (recip ((-1)%1))+(1%1)
> 0 % -1
> Main> ((recip ((-1)%1))+(1%1))==0
> False

It's the same with HUGS Version November 2002, which
is the newest I know of.

Counterexample in GHCI:

> ghci 5.04:
> 
> *Main> (-1)%1
> -1 % 1
> *Main> recip ((-1)%1)
> -1 % 1
> *Main> (recip ((-1)%1))+(1%1)
> 0 % 1
> *Main> ((recip ((-1)%1))+(1%1))==0
> True

Kind regards,
Robert


More information about the Hugs-Bugs mailing list