[RFC] Test/Math: Use better result for cbrtl

Paul Zimmermann Paul.Zimmermann@inria.fr
Fri Dec 13 08:32:05 GMT 2024


       Hi YunQiang Su,

> -= cbrt upward binary128 -0x3.300d34p+0 : -0x1.78c2cb7ea3cdf6c95160af9c9402p+0 : inexact-ok
> += cbrt upward binary128 -0x3.300d34p+0 : -0x1.78c2cb7ea3cdf6c95160af9c9403p+0 : inexact-ok

I disagree with that change. The value -0x1.78...403p+0 is smaller than
cbrt(-0x3.300d34p+0) as demonstrated with SageMath:

sage: x=R("-0x3.300d34p+0",16)
sage: z=R("-0x1.78c2cb7ea3cdf6c95160af9c9403p+0",16)
sage: n(z.exact_rational()+abs(X)^(1/3),200)
-1.3666378698334518386507427692097017268787337799646990279868e-36

Since we round upward, we should have a value larger than cbrt(x).

Paul


More information about the Libc-alpha mailing list