[PATCH] Fix ldbl-128ibm ceill, floorl, roundl and truncl zero-sign handling
Joseph Myers
josmyers@redhat.com
Mon Jan 19 21:55:46 GMT 2026
On Sun, 18 Jan 2026, Aurelien Jarno wrote:
> When the result of ceill, floorl, roundl and truncl is zero, the sign of
> the result must match the sign of the input. For the IBM 128-bit long
> double format, the sign is determined by the high part.
>
> Ensure the correct sign when the high part is the result of
> computations, by copying the sign from the input high part to the output
> high part. On POWER, this conveniently maps to the fcpsgn instruction.
>
> Fixes: BZ #33623
I think there should be tests added (to libm-test-ceil.inc etc.) that test
these bugs directly rather than relying on testing indirectly via the
fromfp functions.
--
Joseph S. Myers
josmyers@redhat.com
More information about the Libc-alpha
mailing list