floor/ceil man pages

Alejandro Colomar alx@kernel.org
Tue Feb 10 23:38:07 GMT 2026


Hi Morten, Joseph,

On 2026-01-29T13:08:43-0500, Morten Welinder wrote:
> For NaN, it comes down to the ieee spec.  Ieee-754-2008 in Section 6.3
> specifies that the only operations delivering a defined sign for NaNs
> are: copy, abs, negate, and copysign.  "For all other operations, this
> standard does not specify the sign bit of a NaN result, even when
> there is only one input NaN, or when the NaN is produced from an
> invalid operation."
> 
> The glibc people have in the past defended the freedom to return
> whatever sign on NaN they feel like.  See
> https://sourceware.org/bugzilla/show_bug.cgi?id=31104 for an example
> where float/double/long double versions of various functions disagree
> on what sign to return for NaN.
> 
> I don't think the man page should promise more than some standard
> requires unless the implementation is specifically offering further
> guarantees.

Agree.  Would you want to send a patch?


Have a lovely night!
Alex

> 
> M.

-- 
<https://www.alejandro-colomar.es>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <https://sourceware.org/pipermail/libc-help/attachments/20260211/9c1b853c/attachment.sig>


More information about the Libc-help mailing list