On Fri, 28 Feb 2020, Tobias Burnus wrote:

> Regarding MIN and MAX: I think the IEEE 754 decided at some point
> decided that MAX(x, NaN) = x (IEEE 754:2008 alias ISO 60559:2011, if I
> recall correctly). I think one has to check what exactly the test case
> does and what is guaranteed where. I also do not know whether a more
> recent IEEE 754 (754:2019) has changed something again.

It has.  The maxNum/minNum operations from IEEE 754-2008 were removed and 
replaced by recommended operations maximum/minimum (treat NaNs the same 
way as other operations do, i.e. produce a quiet NaN result if either 
operand is a NaN) and maximumNumber/minimumNumber (return the number if 
the other operand is a NaN, even a signaling NaN, with "invalid" raised in 
the signaling NaN case).  Those new operations also treat +0 as greater 
than -0, whereas maxNum/minNum did not specify the result in that case.  
(The choice of which operand is the result is still unspecified when the 
two operands are different DFP members of the same cohort, i.e. with 
different quantum exponents.)

-- 
Joseph S. Myers
jos...@codesourcery.com

Reply via email to