On Fri, 10 Nov 2017, Bruce Evans wrote:

> Hmm, POSIX has the caveat that functions might never see signaling NaNs
> since parameter passing might turn them into quiet NaNs (and raise an
> exception).  I'm used to i387 floating point where this tends to always

So indeed does TS 18661-1 (assignment to the same format and conversion as 
if by assignment to the same format may be either a convertFormat or a 
copy operation).

For certain functions (fmax / fmin / hypot / pow), however, sNaN arguments 
(if they reach the function at all) are sometimes handled differently from 
qNaN arguments + invalid exception, and so you can tell from the result 
whether the sNaN reached the function (and the TS 18661-1 rule of it being 
implementation-defined whether that's a domain error, so 
implementation-defined whether errno should be set in the 
(math_errhandling & MATH_ERRNO) != 0 case, should still apply).

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

Reply via email to