public inbox for linux-man@vger.kernel.org
 help / color / mirror / Atom feed
* floor/ceil man pages
@ 2026-01-28 14:51 Morten Welinder
  2026-01-29 15:37 ` Alejandro Colomar
  0 siblings, 1 reply; 5+ messages in thread
From: Morten Welinder @ 2026-01-28 14:51 UTC (permalink / raw)
  To: Alejandro Colomar, linux-man

I see two minor problems:

"If x is integral, +0, -0, NaN, or infinite, x itself is returned." --
this seems to suggest that NaN is passed through unchanged, i.e., the
type and sign of the NaN is unchanged.  Other references I can find
suggest that the NaN details are not guaranted.  See
https://en.cppreference.com/w/c/numeric/math/floor.html, for example.

"ceil(-0.5) is 0.0".  I can't find a reference, but (1) this looks
weird, and (2) it looks like libc actually returns -0.0 which makes
more sense.  As noted above, ceil(-0.0) is required to be -0.0 if if
ceil(-0.5) were to return +0.0 it would make ceil a non-monotonic
function.

M.

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2026-02-10 23:38 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-01-28 14:51 floor/ceil man pages Morten Welinder
2026-01-29 15:37 ` Alejandro Colomar
2026-01-29 16:27   ` Joseph Myers
2026-01-29 18:08     ` Morten Welinder
2026-02-10 23:38       ` Alejandro Colomar

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox