public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
* Man page issues: logb, significand, cbrt, log2, log10, exp10
@ 2024-03-04 15:29 Wilco Dijkstra
  2024-03-05  8:14 ` Paul Zimmermann
  0 siblings, 1 reply; 9+ messages in thread
From: Wilco Dijkstra @ 2024-03-04 15:29 UTC (permalink / raw)
  To: mwelinder; +Cc: 'GNU C Library', Adhemerval Zanella

Hi,

> FWIW, it appears that the author of the glibc exp10 implementation
> agrees with me that the implementation is sub-standard:

As Adhemerval pointed out, that was not the implementation used in GLIBC.
The version that was used, wasn't perfect, but still better than MUSL:

> Compare with musl:
>
> https://github.com/rofl0r/musl/blob/master/src/math/exp10.c

The worst case error of MUSL is 4.14 ULP vs 2.01 ULP of the old GLIBC exp10 [1].

And the new exp10 in GLIBC is 0.513 ULP [2].

As I pointed out in the PR, it would be reasonable for compilers to convert
pow (10, x) into exp10 (x) when it is known there is a good implementation
available - in GLIBC, exp10 is both faster and slightly more accurate than pow.

Cheers,
Wilco

[1] https://members.loria.fr/PZimmermann/papers/glibc238-20230921.pdf
[2] https://members.loria.fr/PZimmermann/papers/accuracy.pdf

^ permalink raw reply	[flat|nested] 9+ messages in thread
[parent not found: <CANv4PNkVv_0eLgiSP3L_KfC-eZJaVLZ5AP1AGfD0GNrR5M4Hrg@mail.gmail.com>]

end of thread, other threads:[~2024-03-05  8:14 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-03-04 15:29 Man page issues: logb, significand, cbrt, log2, log10, exp10 Wilco Dijkstra
2024-03-05  8:14 ` Paul Zimmermann
     [not found] <CANv4PNkVv_0eLgiSP3L_KfC-eZJaVLZ5AP1AGfD0GNrR5M4Hrg@mail.gmail.com>
     [not found] ` <ZeEnJB96mMC5bfBz@debian>
     [not found]   ` <CANv4PNmMpiwfv5acr7U6VEVe7PE_AMTzkkpNoNN9jrtVzk_93Q@mail.gmail.com>
2024-03-02 21:54     ` Alejandro Colomar
2024-03-03  2:02       ` Morten Welinder
2024-03-03  2:21         ` Alejandro Colomar
2024-03-03 11:46           ` Vincent Lefevre
2024-03-03 12:21             ` Alejandro Colomar
2024-03-03 22:26               ` Morten Welinder
2024-03-04 12:17         ` Adhemerval Zanella Netto

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).