View mode: basic / threaded / horizontal-split · Log in · Help
August 21, 2012
Re: NaNs Just Don't Get No Respect
On Tuesday, 21 August 2012 at 08:15:10 UTC, Don Clugston wrote:
> No, it's the other way around.
> The IEEE 754 standard defines min(x, NaN) == min(NaN, x) == x.
>
> According to the C standard, fmin() should be returning 10, as 
> well.
> There is a bug in fmin().
>
> However min() and max() are extremely unusual in this respect. 
> Almost everything else involving a NaN returns NaN.

I did not know that. It seems like a not-so-useful rule but I 
guess they have their reasons. Note that in my example, fmin() 
_did_ return 10 - it was min() that returned NaN...
Next ›   Last »
4 5 6 7 8
Top | Discussion index | About this forum | D home