recip bug?!

Robert Reitmeier <[email protected]>
Newsgroups gmane.comp.lang.haskell.hugs.bugs
Message-ID <[email protected]>
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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.