[PATCH v2] Fix ldbl-128ibm ceill, floorl, roundl and truncl zero-sign handling

Aurelien Jarno aurelien@aurel32.net
Fri Jan 23 20:40:05 GMT 2026


Hi,

On 2026-01-22 10:38, Adhemerval Zanella Netto wrote:
> 
> 
> On 20/01/26 14:25, 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.
> > 
> > In addition add test for the values provided in BZ #33623, and for the
> > opposite value when the result is 0.
> > 
> > Fixes: BZ #33623
> 
> LGTM, thanks.
> 
> Reviewed-by: Adhemerval Zanella  <adhemerval.zanella@linaro.org>

Thanks for the review Adhemerval.

Andreas, would that change be ok for 2.43, or is it better to wait for 
the release and backport it afterwards?

Note that this doesn't fix a regression (the issue is there for quite a 
some time), but it fixes new tests that appear as failing on 
PowerPC64LE.

Regards
Aurelien

-- 
Aurelien Jarno                          GPG: 4096R/1DDD8C9B
aurelien@aurel32.net                     http://aurel32.net


More information about the Libc-alpha mailing list