unofficial mirror of libc-alpha@sourceware.org
 help / color / mirror / Atom feed
* accuracy of mathematical functions
@ 2021-02-05 10:35 Paul Zimmermann
  0 siblings, 0 replies; 10+ messages in thread
From: Paul Zimmermann @ 2021-02-05 10:35 UTC (permalink / raw)
  To: libc-alpha

       Hi,

I have updated my comparison with the newly released 2.33 version.
No big difference with the previous version, except that I included
the "long double" format (aka ldbl-96), as suggested by Joseph Myers,
for which the Intel Math library is uniformly better than all other libraries.

https://members.loria.fr/PZimmermann/papers/#accuracy

Paul

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Accuracy of Mathematical Functions
@ 2021-09-07 14:45 Paul Zimmermann
  0 siblings, 0 replies; 10+ messages in thread
From: Paul Zimmermann @ 2021-09-07 14:45 UTC (permalink / raw)
  To: libc-alpha; +Cc: vincenzo.innocente

       Hi,

a new update of "Accuracy of Mathematical Functions in Single, Double,
Extended Double and Quadruple Precision" is available:

https://members.loria.fr/PZimmermann/papers/#accuracy

This update is with GNU libc 2.34. One improvement in GNU libc is that
the maximal error for the Bessel functions in single precision (except j0)
has decreased from millions of ulps to a few ulps.

This update considers two additional libraries: the Apple math library and
the CUDA library (thanks to Vincenzo Innocente).

Best regards,
Paul Zimmermann

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Accuracy of Mathematical Functions
@ 2022-02-11  8:22 Paul Zimmermann
  2022-02-11 18:23 ` Joseph Myers
  0 siblings, 1 reply; 10+ messages in thread
From: Paul Zimmermann @ 2022-02-11  8:22 UTC (permalink / raw)
  To: libc-alpha; +Cc: vincenzo.innocente

       Hi,

with the release of GNU libc 2.35, we have published a new version of our
comparison of the accuracy of mathematical libraries:

https://members.loria.fr/PZimmermann/papers/accuracy.pdf

For the GNU libc, with respect to 2.34, we observed an improvement in j0f,
tgamma, hypot, hypotl and hypotf128.

With respect to the previous update, we compare two new libraries: LLVM libc
and ROCm.

Paul Zimmermann

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Accuracy of Mathematical Functions
  2022-02-11  8:22 Paul Zimmermann
@ 2022-02-11 18:23 ` Joseph Myers
  2022-02-12  6:39   ` Paul Zimmermann
  0 siblings, 1 reply; 10+ messages in thread
From: Joseph Myers @ 2022-02-11 18:23 UTC (permalink / raw)
  To: Paul Zimmermann; +Cc: libc-alpha, vincenzo.innocente

On Fri, 11 Feb 2022, Paul Zimmermann wrote:

>        Hi,
> 
> with the release of GNU libc 2.35, we have published a new version of our
> comparison of the accuracy of mathematical libraries:
> 
> https://members.loria.fr/PZimmermann/papers/accuracy.pdf
> 
> For the GNU libc, with respect to 2.34, we observed an improvement in j0f,
> tgamma, hypot, hypotl and hypotf128.
> 
> With respect to the previous update, we compare two new libraries: LLVM libc
> and ROCm.

Thanks for the update.  A few remarks on things it might be interesting to 
add to the analysis:

1. I don't know if any of those libraries include any of the new functions 
C23 adds from TS 18661-4 (beyond exp10), but if they do, it might be worth 
adding them to the comparison.  (My remarks from 
<https://sourceware.org/pipermail/libc-alpha/2022-January/135006.html> 
apply regarding adding them to glibc - when I get time I hope to add them, 
as with other new C23 features, if no-one else has done them by then.)

2. I don't know if any of those libraries have IEEE binary16 functions (C 
_Float16), but again, if any do, they might be worth testing (in that 
case, exhaustive testing should be possible for functions of two 
arguments, not just functions of a single argument).

3. As previously remarked, FreeBSD libm is another implementation that 
might be worth testing (though that would require running the tests on a 
FreeBSD system).

4. As previously remarked, it would be interesting to see similar data for 
complex functions (real and imaginary parts of the result of a function 
with one complex argument being essentially the same as the case of a 
function with a real result and two real arguments).

-- 
Joseph S. Myers
joseph@codesourcery.com

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Accuracy of Mathematical Functions
  2022-02-11 18:23 ` Joseph Myers
@ 2022-02-12  6:39   ` Paul Zimmermann
  2022-02-15  1:52     ` Joseph Myers
  0 siblings, 1 reply; 10+ messages in thread
From: Paul Zimmermann @ 2022-02-12  6:39 UTC (permalink / raw)
  To: Joseph Myers; +Cc: libc-alpha, vincenzo.innocente

       Dear Joseph,

> Date: Fri, 11 Feb 2022 18:23:58 +0000
> From: Joseph Myers <joseph@codesourcery.com>
> 
> On Fri, 11 Feb 2022, Paul Zimmermann wrote:
> 
> >        Hi,
> > 
> > with the release of GNU libc 2.35, we have published a new version of our
> > comparison of the accuracy of mathematical libraries:
> > 
> > https://members.loria.fr/PZimmermann/papers/accuracy.pdf
> > 
> > For the GNU libc, with respect to 2.34, we observed an improvement in j0f,
> > tgamma, hypot, hypotl and hypotf128.
> > 
> > With respect to the previous update, we compare two new libraries: LLVM libc
> > and ROCm.
> 
> Thanks for the update.  A few remarks on things it might be interesting to 
> add to the analysis:
> 
> 1. I don't know if any of those libraries include any of the new functions 
> C23 adds from TS 18661-4 (beyond exp10), but if they do, it might be worth 
> adding them to the comparison.  (My remarks from 
> <https://sourceware.org/pipermail/libc-alpha/2022-January/135006.html> 
> apply regarding adding them to glibc - when I get time I hope to add them, 
> as with other new C23 features, if no-one else has done them by then.)

is http://www.open-std.org/jtc1/sc22/wg14/www/docs/n1946.pdf the correct
reference for the list of these functions? Most of them are available in
MPFR, when they will be available in glibc we might indeed add them.

> 2. I don't know if any of those libraries have IEEE binary16 functions (C 
> _Float16), but again, if any do, they might be worth testing (in that 
> case, exhaustive testing should be possible for functions of two 
> arguments, not just functions of a single argument).
>
> 3. As previously remarked, FreeBSD libm is another implementation that 
> might be worth testing (though that would require running the tests on a 
> FreeBSD system).
> 
> 4. As previously remarked, it would be interesting to see similar data for 
> complex functions (real and imaginary parts of the result of a function 
> with one complex argument being essentially the same as the case of a 
> function with a real result and two real arguments).

for points 2-4, I agree this would be interesting, but we have limited
manpower. If anyone wants to help us, she/he is welcome!

Best regards,
Paul

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Accuracy of Mathematical Functions
  2022-02-12  6:39   ` Paul Zimmermann
@ 2022-02-15  1:52     ` Joseph Myers
  0 siblings, 0 replies; 10+ messages in thread
From: Joseph Myers @ 2022-02-15  1:52 UTC (permalink / raw)
  To: Paul Zimmermann; +Cc: libc-alpha, vincenzo.innocente

On Sat, 12 Feb 2022, Paul Zimmermann wrote:

> > 1. I don't know if any of those libraries include any of the new functions 
> > C23 adds from TS 18661-4 (beyond exp10), but if they do, it might be worth 
> > adding them to the comparison.  (My remarks from 
> > <https://sourceware.org/pipermail/libc-alpha/2022-January/135006.html> 
> > apply regarding adding them to glibc - when I get time I hope to add them, 
> > as with other new C23 features, if no-one else has done them by then.)
> 
> is http://www.open-std.org/jtc1/sc22/wg14/www/docs/n1946.pdf the correct
> reference for the list of these functions? Most of them are available in
> MPFR, when they will be available in glibc we might indeed add them.

I think N2401 was the version used for integration into C23.  I'd advise 
using the current C23 working draft (currently N2731, but hopefully N2912 
will become available soon).

Note that the reduction functions from TS 18661-4 weren't integrated into 
C23 (but would also have been much more awkward to handle in this accuracy 
testing); instead there will be a revision of TS 18661-4 (and -5) based on 
C23 to include those features not integrated.

-- 
Joseph S. Myers
joseph@codesourcery.com

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Accuracy of Mathematical Functions
@ 2022-08-29 10:41 Paul Zimmermann via Libc-alpha
  0 siblings, 0 replies; 10+ messages in thread
From: Paul Zimmermann via Libc-alpha @ 2022-08-29 10:41 UTC (permalink / raw)
  To: libc-alpha; +Cc: vincenzo.innocente

       Hi,

we have updated our comparison after the glibc 2.36 release:

https://members.loria.fr/PZimmermann/papers/accuracy.pdf

Not much improvement for glibc with respect to 2.35.

The main change is that the LLVM library now implements a few
correctly-rounded routines in single precision (log, log10, log2,
hypot), and hypot in double precision.

Paul Zimmermann


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Accuracy of Mathematical Functions
@ 2023-02-14  8:05 Paul Zimmermann via Libc-alpha
  0 siblings, 0 replies; 10+ messages in thread
From: Paul Zimmermann via Libc-alpha @ 2023-02-14  8:05 UTC (permalink / raw)
  To: libc-alpha; +Cc: vincenzo.innocente

       Hi,

we have updated our comparison after the glibc 2.37 release:

https://members.loria.fr/PZimmermann/papers/accuracy.pdf

Not much improvement for glibc with respect to 2.36.

The main change is that the LLVM library now implements more
correctly-rounded routines in single precision.

Paul Zimmermann

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Accuracy of Mathematical Functions
@ 2023-09-21  7:11 Paul Zimmermann
  0 siblings, 0 replies; 10+ messages in thread
From: Paul Zimmermann @ 2023-09-21  7:11 UTC (permalink / raw)
  To: libc-alpha; +Cc: vincenzo.innocente, riemannic

       Dear all,

we have updated our comparison with the glibc 2.38 release:

https://members.loria.fr/PZimmermann/papers/accuracy.pdf

Not much improvement for glibc with respect to 2.37.

However there is a lot of new stuff in this new version:

* the Microsoft math library is now included (it was clearly missing)
* we also added the FreeBSD math library
* and we added some new C23 functions (acospi, cospi, ...) which are available
  in the Intel and FreeBSD math libraries (but not yet in glibc)

Paul Zimmermann

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Accuracy of Mathematical Functions
@ 2024-02-15 14:47 Paul Zimmermann
  0 siblings, 0 replies; 10+ messages in thread
From: Paul Zimmermann @ 2024-02-15 14:47 UTC (permalink / raw)
  To: libc-alpha; +Cc: vincenzo.innocente, riemannic, johnmather

       Dear all,

we have updated our comparison:

https://members.loria.fr/PZimmermann/papers/accuracy.pdf

This is a new version with updated versions of the different libraries, new corner
cases found, and the ARM Performance Library is now included.

Paul Zimmermann

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2024-02-15 14:47 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-07 14:45 Accuracy of Mathematical Functions Paul Zimmermann
  -- strict thread matches above, loose matches on Subject: below --
2024-02-15 14:47 Paul Zimmermann
2023-09-21  7:11 Paul Zimmermann
2023-02-14  8:05 Paul Zimmermann via Libc-alpha
2022-08-29 10:41 Paul Zimmermann via Libc-alpha
2022-02-11  8:22 Paul Zimmermann
2022-02-11 18:23 ` Joseph Myers
2022-02-12  6:39   ` Paul Zimmermann
2022-02-15  1:52     ` Joseph Myers
2021-02-05 10:35 accuracy of mathematical functions Paul Zimmermann

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).