NetBSD-Bugs archive

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

Re: lib/44875

The following reply was made to PR lib/44875; it has been noted by GNATS.

From: Martin Husemann <>
Subject: Re: lib/44875
Date: Mon, 18 Apr 2011 14:47:26 +0200

 On Mon, Apr 18, 2011 at 11:45:02AM +0000, Jukka Ruohonen wrote:
 >  And if I may futher add, the wording probably implies that if "x is y" in
 >  terms of (sufficient) floating point representation/rounding, then y is
 >  returned.
 Yes, all fine - but is there any (even if hypothetical) case where the
 caller could possibly find out the difference?
 I understood we are talking about floting point and == is a hairy operator,
 but still I think the suggested change is a no-op. Given the way it is
 implemented, how could the returned result differ? Are there FP values that
 compare equal and still are distinguishable? Even different inexecat values
 should still compare not equal, shouldn't they? The NaN case is handled
 separately, so we know neither x nor y could be any variant of NaN.
 Btw: I would suggest to go through libm and always use isnan() and friends
 instead of homegrown checks (even if equivalent).

Home | Main Index | Thread Index | Old Index