[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: min, max and nans

From: Kevin Ryde
Subject: Re: min, max and nans
Date: Fri, 30 May 2003 10:20:29 +1000
User-agent: Gnus/5.090019 (Oort Gnus v0.19) Emacs/21.2 (gnu/linux)

Marius Vollmer <address@hidden> writes:
> That's what I think, too.

        * numbers.c (scm_max, scm_min): For inum, bignum and real, if other
        operand is NaN, then return NaN.  Also avoid passing NaN to mpz_cmp_d.

        * tests/numbers.test (max, min): Add tests involving NaNs.

Some cases just need the sense of the > or < test put the right way to
allow for it being false when involving a NaN.  A couple are right
already.  For bignums and for real/real an actual isnan is necessary.

Attachment: numbers.c.min-max-nan.diff
Description: Text document

Attachment: numbers.test.min-max-nan.diff
Description: Text document

reply via email to

[Prev in Thread] Current Thread [Next in Thread]