[PATCH v2 3/8] math: Use sinh from CORE-MATH
Paul Zimmermann
Paul.Zimmermann@inria.fr
Thu Mar 12 07:19:35 GMT 2026
Hi DJ,
these constants are error bounds, indeed they don't need full precision.
I have rounded them up to 13 bits, which corresponds to an increase of
at most 0.01%, which should be much less than the probability of failure
of the fast path.
Paul
> From: DJ Delorie <dj@redhat.com>
> Cc: adhemerval.zanella@linaro.org, libc-alpha@sourceware.org,
> Wilco.Dijkstra@arm.com, josmyers@redhat.com
> Date: Wed, 11 Mar 2026 18:42:37 -0400
>
> Paul Zimmermann <Paul.Zimmermann@inria.fr> writes:
> > thank you DJ, I changed to hexadecimal constants upstream:
> >
> > - double e = 0.12e-18*th, lb = rh + (rl - e), ub = rh + (rl + e);
> > + double e = 0x1.1b6p-63*th, lb = rh + (rl - e), ub = rh + (rl + e);
> >
> > - double e = 0.122e-18*rh, lb = rh + (rl - e), ub = rh + (rl + e);
> > + double e = 0x1.202p-63*rh, lb = rh + (rl - e), ub = rh + (rl + e);
> >
> > - double e = 0.38e-18*rh, lb = rh + (rl - e), ub = rh + (rl + e);
> > + double e = 0x1.c0ap-62*rh, lb = rh + (rl - e), ub = rh + (rl + e);
>
> That change alone tells me these constants don't need the precision of a
> p format, because those values don't exactly match ;-)
>
> I still think the consistency is worth the change though, because you
> can specify how many bits of useful precision you need.
>
>
More information about the Libc-alpha
mailing list