* [PATCH] math: Add more input to atanh accuracy tests
@ 2022-02-16 2:57 Sunil K Pandey
2022-02-16 7:43 ` Paul Zimmermann
0 siblings, 1 reply; 11+ messages in thread
From: Sunil K Pandey @ 2022-02-16 2:57 UTC (permalink / raw)
To: libc-alpha
This patch adds following input to atanh accuracy test.
0x1.f80094p-8
Tested on x86-64 and i686 platforms.
Other platforms may have to regenerate ulps file.
---
math/auto-libm-test-in | 2 ++
math/auto-libm-test-out-atanh | 25 +++++++++++++++++++++++++
2 files changed, 27 insertions(+)
diff --git a/math/auto-libm-test-in b/math/auto-libm-test-in
index 9080afe4fb..4d286324bf 100644
--- a/math/auto-libm-test-in
+++ b/math/auto-libm-test-in
@@ -617,6 +617,8 @@ atanh -0x3.98eaf4p-4
atanh 0x2.c1085p-4
atanh 0x1p-500
atanh 0x1p-5000
+# the next value generates larger error bounds on x86_64 (binary32)
+atanh 0x1.f80094p-8
# the next value generates larger error bounds on x86_64 (binary128)
atanh 0x2.c02a24f3472c7840afbd8cfb68bap-4
atanh min
diff --git a/math/auto-libm-test-out-atanh b/math/auto-libm-test-out-atanh
index 378ef6e8cf..a5243264be 100644
--- a/math/auto-libm-test-out-atanh
+++ b/math/auto-libm-test-out-atanh
@@ -3112,6 +3112,31 @@ atanh 0x1p-5000
= atanh tonearest binary128 0x1p-5000 : 0x1p-5000 : inexact-ok
= atanh towardzero binary128 0x1p-5000 : 0x1p-5000 : inexact-ok
= atanh upward binary128 0x1p-5000 : 0x1.0000000000000000000000000001p-5000 : inexact-ok
+atanh 0x1.f80094p-8
+= atanh downward binary32 0x1.f80094p-8 : 0x1.f8031ep-8 : inexact-ok
+= atanh tonearest binary32 0x1.f80094p-8 : 0x1.f8032p-8 : inexact-ok
+= atanh towardzero binary32 0x1.f80094p-8 : 0x1.f8031ep-8 : inexact-ok
+= atanh upward binary32 0x1.f80094p-8 : 0x1.f8032p-8 : inexact-ok
+= atanh downward binary64 0x1.f80094p-8 : 0x1.f8031f3228153p-8 : inexact-ok
+= atanh tonearest binary64 0x1.f80094p-8 : 0x1.f8031f3228154p-8 : inexact-ok
+= atanh towardzero binary64 0x1.f80094p-8 : 0x1.f8031f3228153p-8 : inexact-ok
+= atanh upward binary64 0x1.f80094p-8 : 0x1.f8031f3228154p-8 : inexact-ok
+= atanh downward intel96 0x1.f80094p-8 : 0x1.f8031f3228153f0ep-8 : inexact-ok
+= atanh tonearest intel96 0x1.f80094p-8 : 0x1.f8031f3228153f0ep-8 : inexact-ok
+= atanh towardzero intel96 0x1.f80094p-8 : 0x1.f8031f3228153f0ep-8 : inexact-ok
+= atanh upward intel96 0x1.f80094p-8 : 0x1.f8031f3228153f1p-8 : inexact-ok
+= atanh downward m68k96 0x1.f80094p-8 : 0x1.f8031f3228153f0ep-8 : inexact-ok
+= atanh tonearest m68k96 0x1.f80094p-8 : 0x1.f8031f3228153f0ep-8 : inexact-ok
+= atanh towardzero m68k96 0x1.f80094p-8 : 0x1.f8031f3228153f0ep-8 : inexact-ok
+= atanh upward m68k96 0x1.f80094p-8 : 0x1.f8031f3228153f1p-8 : inexact-ok
+= atanh downward binary128 0x1.f80094p-8 : 0x1.f8031f3228153f0e56e4db72d2afp-8 : inexact-ok
+= atanh tonearest binary128 0x1.f80094p-8 : 0x1.f8031f3228153f0e56e4db72d2bp-8 : inexact-ok
+= atanh towardzero binary128 0x1.f80094p-8 : 0x1.f8031f3228153f0e56e4db72d2afp-8 : inexact-ok
+= atanh upward binary128 0x1.f80094p-8 : 0x1.f8031f3228153f0e56e4db72d2bp-8 : inexact-ok
+= atanh downward ibm128 0x1.f80094p-8 : 0x1.f8031f3228153f0e56e4db72d28p-8 : inexact-ok
+= atanh tonearest ibm128 0x1.f80094p-8 : 0x1.f8031f3228153f0e56e4db72d28p-8 : inexact-ok
+= atanh towardzero ibm128 0x1.f80094p-8 : 0x1.f8031f3228153f0e56e4db72d28p-8 : inexact-ok
+= atanh upward ibm128 0x1.f80094p-8 : 0x1.f8031f3228153f0e56e4db72d3p-8 : inexact-ok
atanh 0x2.c02a24f3472c7840afbd8cfb68bap-4
= atanh downward binary32 0x2.c02a28p-4 : 0x2.c73a3cp-4 : inexact-ok
= atanh tonearest binary32 0x2.c02a28p-4 : 0x2.c73a3cp-4 : inexact-ok
--
2.34.1
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] math: Add more input to atanh accuracy tests
2022-02-16 2:57 [PATCH] math: Add more input to atanh accuracy tests Sunil K Pandey
@ 2022-02-16 7:43 ` Paul Zimmermann
2022-02-16 18:40 ` Sunil Pandey
0 siblings, 1 reply; 11+ messages in thread
From: Paul Zimmermann @ 2022-02-16 7:43 UTC (permalink / raw)
To: Sunil K Pandey; +Cc: libc-alpha
Dear Sunil,
> +# the next value generates larger error bounds on x86_64 (binary32)
> +atanh 0x1.f80094p-8
I only find a error of 0.598 ulp, whereas the largest error for binary32
is obtained for 0x1.ec2dd8p-4 (1.73 ulp). More precisely for x=0x1.f80094p-8
glibc 2.35 returns 0x1.f8031ep-8 (x86_64, skylake). Do you get a different value?
Maybe you used different CFLAGS than the default ones?
Best regards,
Paul
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] math: Add more input to atanh accuracy tests
2022-02-16 7:43 ` Paul Zimmermann
@ 2022-02-16 18:40 ` Sunil Pandey
2022-02-19 4:01 ` Paul Zimmermann
0 siblings, 1 reply; 11+ messages in thread
From: Sunil Pandey @ 2022-02-16 18:40 UTC (permalink / raw)
To: Paul Zimmermann; +Cc: GNU C Library
Hi Paul,
I got an optimization patch for function _ZGVeN16v_atanhf_skx. As a result of
optimization, ulps for(input 0x1.f80094p-8) jumped from ~1.4 to ~2.4 and none
of the existing glibc atanh input catches it.
Currently at glibc master I am getting the following result.
Test: atanh_vlen16 (0x1.f80094p-8)
Result: 0x1.f80322p-8
I also tried input 0x1.ec2dd8p-4 but it doesn't catch the optimization accuracy
error jump for the proposed patch.
Thanks,
Sunil
On Tue, Feb 15, 2022 at 11:43 PM Paul Zimmermann
<Paul.Zimmermann@inria.fr> wrote:
>
> Dear Sunil,
>
> > +# the next value generates larger error bounds on x86_64 (binary32)
> > +atanh 0x1.f80094p-8
>
> I only find a error of 0.598 ulp, whereas the largest error for binary32
> is obtained for 0x1.ec2dd8p-4 (1.73 ulp). More precisely for x=0x1.f80094p-8
> glibc 2.35 returns 0x1.f8031ep-8 (x86_64, skylake). Do you get a different value?
> Maybe you used different CFLAGS than the default ones?
>
> Best regards,
> Paul
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] math: Add more input to atanh accuracy tests
2022-02-16 18:40 ` Sunil Pandey
@ 2022-02-19 4:01 ` Paul Zimmermann
2022-02-24 0:04 ` [PATCH v2] " Sunil K Pandey
2022-02-24 3:32 ` [PATCH] " Sunil Pandey
0 siblings, 2 replies; 11+ messages in thread
From: Paul Zimmermann @ 2022-02-19 4:01 UTC (permalink / raw)
To: Sunil Pandey; +Cc: libc-alpha
Dear Sunil,
here is what I get with glibc master (b98d0bb):
$ LIBMVEC=512 GLIBC=glibc ./doit.libmvec atanh
LIBMVEC=512 -mavx512f
00000000004148f0 T mpfr_atanh
0000000000401668 t mpfr_atanh.cold
U _ZGVeN16v_atanhf@GLIBC_2.35
Checking atanh with libmvec from glibc and rndn
Sat 19 Feb 2022 04:48:53 AM CET
MPFR library: 4.1.0
MPFR header: 4.1.0 (based on 4.1.0)
Checking function atanhf with MPFR_RNDN
libm wrong by up to 1.45e+00 ulp(s) [1] for x=0x1.f2100ap-9
atanh gives 0x1.f210aap-9
mpfr_atanh gives 0x1.f210a8p-9
Total: errors=58600734 (1.37%) errors2=0 maxerr=1.45e+00 ulp(s)
The maximal error is still 1.45 ulps.
Anyway, I guess the comment in auto-libm-test-in should say this is for
libmvec, and with -avx512.
Paul
> From: Sunil Pandey <skpgkp2@gmail.com>
> Date: Wed, 16 Feb 2022 10:40:06 -0800
> Cc: GNU C Library <libc-alpha@sourceware.org>
>
> Hi Paul,
>
> I got an optimization patch for function _ZGVeN16v_atanhf_skx. As a result of
> optimization, ulps for(input 0x1.f80094p-8) jumped from ~1.4 to ~2.4 and none
> of the existing glibc atanh input catches it.
>
> Currently at glibc master I am getting the following result.
>
> Test: atanh_vlen16 (0x1.f80094p-8)
> Result: 0x1.f80322p-8
>
> I also tried input 0x1.ec2dd8p-4 but it doesn't catch the optimization accuracy
> error jump for the proposed patch.
>
> Thanks,
> Sunil
>
>
> On Tue, Feb 15, 2022 at 11:43 PM Paul Zimmermann
> <Paul.Zimmermann@inria.fr> wrote:
> >
> > Dear Sunil,
> >
> > > +# the next value generates larger error bounds on x86_64 (binary32)
> > > +atanh 0x1.f80094p-8
> >
> > I only find a error of 0.598 ulp, whereas the largest error for binary32
> > is obtained for 0x1.ec2dd8p-4 (1.73 ulp). More precisely for x=0x1.f80094p-8
> > glibc 2.35 returns 0x1.f8031ep-8 (x86_64, skylake). Do you get a different value?
> > Maybe you used different CFLAGS than the default ones?
> >
> > Best regards,
> > Paul
>
^ permalink raw reply [flat|nested] 11+ messages in thread
* [PATCH v2] math: Add more input to atanh accuracy tests
2022-02-19 4:01 ` Paul Zimmermann
@ 2022-02-24 0:04 ` Sunil K Pandey
2022-02-24 9:37 ` Paul Zimmermann
2022-02-24 3:32 ` [PATCH] " Sunil Pandey
1 sibling, 1 reply; 11+ messages in thread
From: Sunil K Pandey @ 2022-02-24 0:04 UTC (permalink / raw)
To: libc-alpha
This patch adds following input to atanh accuracy test.
0x1.f80094p-8
Tested on x86-64 and i686 platforms.
Other platforms may have to regenerate ulps file.
---
math/auto-libm-test-in | 3 +++
math/auto-libm-test-out-atanh | 25 +++++++++++++++++++++++++
2 files changed, 28 insertions(+)
diff --git a/math/auto-libm-test-in b/math/auto-libm-test-in
index 9080afe4fb..30fbada31f 100644
--- a/math/auto-libm-test-in
+++ b/math/auto-libm-test-in
@@ -617,6 +617,9 @@ atanh -0x3.98eaf4p-4
atanh 0x2.c1085p-4
atanh 0x1p-500
atanh 0x1p-5000
+# the next value generates larger error bounds in libmvec/avx512 on x86_64
+# (binary32)
+atanh 0x1.f80094p-8
# the next value generates larger error bounds on x86_64 (binary128)
atanh 0x2.c02a24f3472c7840afbd8cfb68bap-4
atanh min
diff --git a/math/auto-libm-test-out-atanh b/math/auto-libm-test-out-atanh
index 378ef6e8cf..a5243264be 100644
--- a/math/auto-libm-test-out-atanh
+++ b/math/auto-libm-test-out-atanh
@@ -3112,6 +3112,31 @@ atanh 0x1p-5000
= atanh tonearest binary128 0x1p-5000 : 0x1p-5000 : inexact-ok
= atanh towardzero binary128 0x1p-5000 : 0x1p-5000 : inexact-ok
= atanh upward binary128 0x1p-5000 : 0x1.0000000000000000000000000001p-5000 : inexact-ok
+atanh 0x1.f80094p-8
+= atanh downward binary32 0x1.f80094p-8 : 0x1.f8031ep-8 : inexact-ok
+= atanh tonearest binary32 0x1.f80094p-8 : 0x1.f8032p-8 : inexact-ok
+= atanh towardzero binary32 0x1.f80094p-8 : 0x1.f8031ep-8 : inexact-ok
+= atanh upward binary32 0x1.f80094p-8 : 0x1.f8032p-8 : inexact-ok
+= atanh downward binary64 0x1.f80094p-8 : 0x1.f8031f3228153p-8 : inexact-ok
+= atanh tonearest binary64 0x1.f80094p-8 : 0x1.f8031f3228154p-8 : inexact-ok
+= atanh towardzero binary64 0x1.f80094p-8 : 0x1.f8031f3228153p-8 : inexact-ok
+= atanh upward binary64 0x1.f80094p-8 : 0x1.f8031f3228154p-8 : inexact-ok
+= atanh downward intel96 0x1.f80094p-8 : 0x1.f8031f3228153f0ep-8 : inexact-ok
+= atanh tonearest intel96 0x1.f80094p-8 : 0x1.f8031f3228153f0ep-8 : inexact-ok
+= atanh towardzero intel96 0x1.f80094p-8 : 0x1.f8031f3228153f0ep-8 : inexact-ok
+= atanh upward intel96 0x1.f80094p-8 : 0x1.f8031f3228153f1p-8 : inexact-ok
+= atanh downward m68k96 0x1.f80094p-8 : 0x1.f8031f3228153f0ep-8 : inexact-ok
+= atanh tonearest m68k96 0x1.f80094p-8 : 0x1.f8031f3228153f0ep-8 : inexact-ok
+= atanh towardzero m68k96 0x1.f80094p-8 : 0x1.f8031f3228153f0ep-8 : inexact-ok
+= atanh upward m68k96 0x1.f80094p-8 : 0x1.f8031f3228153f1p-8 : inexact-ok
+= atanh downward binary128 0x1.f80094p-8 : 0x1.f8031f3228153f0e56e4db72d2afp-8 : inexact-ok
+= atanh tonearest binary128 0x1.f80094p-8 : 0x1.f8031f3228153f0e56e4db72d2bp-8 : inexact-ok
+= atanh towardzero binary128 0x1.f80094p-8 : 0x1.f8031f3228153f0e56e4db72d2afp-8 : inexact-ok
+= atanh upward binary128 0x1.f80094p-8 : 0x1.f8031f3228153f0e56e4db72d2bp-8 : inexact-ok
+= atanh downward ibm128 0x1.f80094p-8 : 0x1.f8031f3228153f0e56e4db72d28p-8 : inexact-ok
+= atanh tonearest ibm128 0x1.f80094p-8 : 0x1.f8031f3228153f0e56e4db72d28p-8 : inexact-ok
+= atanh towardzero ibm128 0x1.f80094p-8 : 0x1.f8031f3228153f0e56e4db72d28p-8 : inexact-ok
+= atanh upward ibm128 0x1.f80094p-8 : 0x1.f8031f3228153f0e56e4db72d3p-8 : inexact-ok
atanh 0x2.c02a24f3472c7840afbd8cfb68bap-4
= atanh downward binary32 0x2.c02a28p-4 : 0x2.c73a3cp-4 : inexact-ok
= atanh tonearest binary32 0x2.c02a28p-4 : 0x2.c73a3cp-4 : inexact-ok
--
2.34.1
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] math: Add more input to atanh accuracy tests
2022-02-19 4:01 ` Paul Zimmermann
2022-02-24 0:04 ` [PATCH v2] " Sunil K Pandey
@ 2022-02-24 3:32 ` Sunil Pandey
1 sibling, 0 replies; 11+ messages in thread
From: Sunil Pandey @ 2022-02-24 3:32 UTC (permalink / raw)
To: Paul Zimmermann; +Cc: GNU C Library
On Fri, Feb 18, 2022 at 8:01 PM Paul Zimmermann
<Paul.Zimmermann@inria.fr> wrote:
>
> Dear Sunil,
>
> here is what I get with glibc master (b98d0bb):
>
> $ LIBMVEC=512 GLIBC=glibc ./doit.libmvec atanh
> LIBMVEC=512 -mavx512f
> 00000000004148f0 T mpfr_atanh
> 0000000000401668 t mpfr_atanh.cold
> U _ZGVeN16v_atanhf@GLIBC_2.35
> Checking atanh with libmvec from glibc and rndn
> Sat 19 Feb 2022 04:48:53 AM CET
> MPFR library: 4.1.0
> MPFR header: 4.1.0 (based on 4.1.0)
> Checking function atanhf with MPFR_RNDN
> libm wrong by up to 1.45e+00 ulp(s) [1] for x=0x1.f2100ap-9
> atanh gives 0x1.f210aap-9
> mpfr_atanh gives 0x1.f210a8p-9
> Total: errors=58600734 (1.37%) errors2=0 maxerr=1.45e+00 ulp(s)
>
> The maximal error is still 1.45 ulps.
>
> Anyway, I guess the comment in auto-libm-test-in should say this is for
> libmvec, and with -avx512.
Comment fixed in v2.
>
> Paul
>
> > From: Sunil Pandey <skpgkp2@gmail.com>
> > Date: Wed, 16 Feb 2022 10:40:06 -0800
> > Cc: GNU C Library <libc-alpha@sourceware.org>
> >
> > Hi Paul,
> >
> > I got an optimization patch for function _ZGVeN16v_atanhf_skx. As a result of
> > optimization, ulps for(input 0x1.f80094p-8) jumped from ~1.4 to ~2.4 and none
> > of the existing glibc atanh input catches it.
> >
> > Currently at glibc master I am getting the following result.
> >
> > Test: atanh_vlen16 (0x1.f80094p-8)
> > Result: 0x1.f80322p-8
> >
> > I also tried input 0x1.ec2dd8p-4 but it doesn't catch the optimization accuracy
> > error jump for the proposed patch.
> >
> > Thanks,
> > Sunil
> >
> >
> > On Tue, Feb 15, 2022 at 11:43 PM Paul Zimmermann
> > <Paul.Zimmermann@inria.fr> wrote:
> > >
> > > Dear Sunil,
> > >
> > > > +# the next value generates larger error bounds on x86_64 (binary32)
> > > > +atanh 0x1.f80094p-8
> > >
> > > I only find a error of 0.598 ulp, whereas the largest error for binary32
> > > is obtained for 0x1.ec2dd8p-4 (1.73 ulp). More precisely for x=0x1.f80094p-8
> > > glibc 2.35 returns 0x1.f8031ep-8 (x86_64, skylake). Do you get a different value?
> > > Maybe you used different CFLAGS than the default ones?
> > >
> > > Best regards,
> > > Paul
> >
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH v2] math: Add more input to atanh accuracy tests
2022-02-24 0:04 ` [PATCH v2] " Sunil K Pandey
@ 2022-02-24 9:37 ` Paul Zimmermann
2022-02-24 15:57 ` Sunil Pandey
0 siblings, 1 reply; 11+ messages in thread
From: Paul Zimmermann @ 2022-02-24 9:37 UTC (permalink / raw)
To: Sunil K Pandey; +Cc: libc-alpha
Dear Sunil,
I cannot reproduce the error of 2.4 ulps with 0x1.f80094p-8, the maximal
error I get is 1.45 ulps (with master revision b98d0bb):
pzimmermann@grvingt-63:~/svn/tbd/20/src/binary32_exhaustive$ LIBMVEC=512 GLIBC=glibc ./doit.libmvec atanh
LIBMVEC=512 -mavx512f
00000000004148f0 T mpfr_atanh
0000000000401668 t mpfr_atanh.cold
U _ZGVeN16v_atanhf@GLIBC_2.35
Checking atanh with libmvec from glibc and rndn
Thu 24 Feb 2022 10:28:21 AM CET
MPFR library: 4.1.0
MPFR header: 4.1.0 (based on 4.1.0)
Checking function atanhf with MPFR_RNDN
libm wrong by up to 1.45e+00 ulp(s) [1] for x=0x1.f2100ap-9
atanh gives 0x1.f210aap-9
mpfr_atanh gives 0x1.f210a8p-9
Total: errors=58600734 (1.37%) errors2=0 maxerr=1.45e+00 ulp(s)
Best regards,
Paul
> Date: Wed, 23 Feb 2022 16:04:23 -0800
> From: Sunil K Pandey via Libc-alpha <libc-alpha@sourceware.org>
>
> This patch adds following input to atanh accuracy test.
>
> 0x1.f80094p-8
>
> Tested on x86-64 and i686 platforms.
> Other platforms may have to regenerate ulps file.
> ---
> math/auto-libm-test-in | 3 +++
> math/auto-libm-test-out-atanh | 25 +++++++++++++++++++++++++
> 2 files changed, 28 insertions(+)
>
> diff --git a/math/auto-libm-test-in b/math/auto-libm-test-in
> index 9080afe4fb..30fbada31f 100644
> --- a/math/auto-libm-test-in
> +++ b/math/auto-libm-test-in
> @@ -617,6 +617,9 @@ atanh -0x3.98eaf4p-4
> atanh 0x2.c1085p-4
> atanh 0x1p-500
> atanh 0x1p-5000
> +# the next value generates larger error bounds in libmvec/avx512 on x86_64
> +# (binary32)
> +atanh 0x1.f80094p-8
> # the next value generates larger error bounds on x86_64 (binary128)
> atanh 0x2.c02a24f3472c7840afbd8cfb68bap-4
> atanh min
> diff --git a/math/auto-libm-test-out-atanh b/math/auto-libm-test-out-atanh
> index 378ef6e8cf..a5243264be 100644
> --- a/math/auto-libm-test-out-atanh
> +++ b/math/auto-libm-test-out-atanh
> @@ -3112,6 +3112,31 @@ atanh 0x1p-5000
> = atanh tonearest binary128 0x1p-5000 : 0x1p-5000 : inexact-ok
> = atanh towardzero binary128 0x1p-5000 : 0x1p-5000 : inexact-ok
> = atanh upward binary128 0x1p-5000 : 0x1.0000000000000000000000000001p-5000 : inexact-ok
> +atanh 0x1.f80094p-8
> += atanh downward binary32 0x1.f80094p-8 : 0x1.f8031ep-8 : inexact-ok
> += atanh tonearest binary32 0x1.f80094p-8 : 0x1.f8032p-8 : inexact-ok
> += atanh towardzero binary32 0x1.f80094p-8 : 0x1.f8031ep-8 : inexact-ok
> += atanh upward binary32 0x1.f80094p-8 : 0x1.f8032p-8 : inexact-ok
> += atanh downward binary64 0x1.f80094p-8 : 0x1.f8031f3228153p-8 : inexact-ok
> += atanh tonearest binary64 0x1.f80094p-8 : 0x1.f8031f3228154p-8 : inexact-ok
> += atanh towardzero binary64 0x1.f80094p-8 : 0x1.f8031f3228153p-8 : inexact-ok
> += atanh upward binary64 0x1.f80094p-8 : 0x1.f8031f3228154p-8 : inexact-ok
> += atanh downward intel96 0x1.f80094p-8 : 0x1.f8031f3228153f0ep-8 : inexact-ok
> += atanh tonearest intel96 0x1.f80094p-8 : 0x1.f8031f3228153f0ep-8 : inexact-ok
> += atanh towardzero intel96 0x1.f80094p-8 : 0x1.f8031f3228153f0ep-8 : inexact-ok
> += atanh upward intel96 0x1.f80094p-8 : 0x1.f8031f3228153f1p-8 : inexact-ok
> += atanh downward m68k96 0x1.f80094p-8 : 0x1.f8031f3228153f0ep-8 : inexact-ok
> += atanh tonearest m68k96 0x1.f80094p-8 : 0x1.f8031f3228153f0ep-8 : inexact-ok
> += atanh towardzero m68k96 0x1.f80094p-8 : 0x1.f8031f3228153f0ep-8 : inexact-ok
> += atanh upward m68k96 0x1.f80094p-8 : 0x1.f8031f3228153f1p-8 : inexact-ok
> += atanh downward binary128 0x1.f80094p-8 : 0x1.f8031f3228153f0e56e4db72d2afp-8 : inexact-ok
> += atanh tonearest binary128 0x1.f80094p-8 : 0x1.f8031f3228153f0e56e4db72d2bp-8 : inexact-ok
> += atanh towardzero binary128 0x1.f80094p-8 : 0x1.f8031f3228153f0e56e4db72d2afp-8 : inexact-ok
> += atanh upward binary128 0x1.f80094p-8 : 0x1.f8031f3228153f0e56e4db72d2bp-8 : inexact-ok
> += atanh downward ibm128 0x1.f80094p-8 : 0x1.f8031f3228153f0e56e4db72d28p-8 : inexact-ok
> += atanh tonearest ibm128 0x1.f80094p-8 : 0x1.f8031f3228153f0e56e4db72d28p-8 : inexact-ok
> += atanh towardzero ibm128 0x1.f80094p-8 : 0x1.f8031f3228153f0e56e4db72d28p-8 : inexact-ok
> += atanh upward ibm128 0x1.f80094p-8 : 0x1.f8031f3228153f0e56e4db72d3p-8 : inexact-ok
> atanh 0x2.c02a24f3472c7840afbd8cfb68bap-4
> = atanh downward binary32 0x2.c02a28p-4 : 0x2.c73a3cp-4 : inexact-ok
> = atanh tonearest binary32 0x2.c02a28p-4 : 0x2.c73a3cp-4 : inexact-ok
> --
> 2.34.1
>
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH v2] math: Add more input to atanh accuracy tests
2022-02-24 9:37 ` Paul Zimmermann
@ 2022-02-24 15:57 ` Sunil Pandey
2022-02-24 16:13 ` Paul Zimmermann
0 siblings, 1 reply; 11+ messages in thread
From: Sunil Pandey @ 2022-02-24 15:57 UTC (permalink / raw)
To: Paul Zimmermann; +Cc: GNU C Library
On Thu, Feb 24, 2022 at 1:37 AM Paul Zimmermann
<Paul.Zimmermann@inria.fr> wrote:
>
> Dear Sunil,
>
> I cannot reproduce the error of 2.4 ulps with 0x1.f80094p-8, the maximal
> error I get is 1.45 ulps (with master revision b98d0bb):
>
Hi Paul,
Please try this one line patch on glibc master. In our testing, before
this patch accuracy for input 0x1.f80094p-8 was ~1.4, after this patch
accuracy for input 0x1.f80094p-8 jumps to 2.4 and it fails. None of
the existing inputs catch this accuracy error jump.
commit c55a882ac9fbe9241cd0537affdbdb35a7a4b6e4 (HEAD ->
users/goldsteinn/atanhf-testable,
origin/users/goldsteinn/atanhf-testable)
Author: Noah Goldstein <goldstein.w.n@gmail.com>
Date: Mon Jan 31 23:00:28 2022 -0600
Does this have any bugs
diff --git a/sysdeps/x86_64/fpu/multiarch/svml_s_atanhf16_core_avx512.S
b/sysdeps/x86_64/fpu/multiarch/svml_s_atanhf16_core_avx512.S
index f863f4f959..064424b977 100644
--- a/sysdeps/x86_64/fpu/multiarch/svml_s_atanhf16_core_avx512.S
+++ b/sysdeps/x86_64/fpu/multiarch/svml_s_atanhf16_core_avx512.S
@@ -148,7 +148,7 @@ ENTRY(_ZGVeN16v_atanhf_skx)
vfmadd213ps {rn-sae}, %zmm5, %zmm3, %zmm1
vmovups poly_coeff2+__svml_satanh_data_internal_avx512(%rip), %zmm3
vmovaps %zmm3, %zmm2
- vfmadd231ps {rn-sae}, %zmm9, %zmm7, %zmm2
+// vfmadd231ps {rn-sae}, %zmm9, %zmm7, %zmm2
vfmadd231ps {rn-sae}, %zmm4, %zmm7, %zmm3
vfmadd213ps {rn-sae}, %zmm12, %zmm9, %zmm2
vfmadd213ps {rn-sae}, %zmm12, %zmm4, %zmm3
Thanks,
Sunil
> pzimmermann@grvingt-63:~/svn/tbd/20/src/binary32_exhaustive$ LIBMVEC=512 GLIBC=glibc ./doit.libmvec atanh
> LIBMVEC=512 -mavx512f
> 00000000004148f0 T mpfr_atanh
> 0000000000401668 t mpfr_atanh.cold
> U _ZGVeN16v_atanhf@GLIBC_2.35
> Checking atanh with libmvec from glibc and rndn
> Thu 24 Feb 2022 10:28:21 AM CET
> MPFR library: 4.1.0
> MPFR header: 4.1.0 (based on 4.1.0)
> Checking function atanhf with MPFR_RNDN
> libm wrong by up to 1.45e+00 ulp(s) [1] for x=0x1.f2100ap-9
> atanh gives 0x1.f210aap-9
> mpfr_atanh gives 0x1.f210a8p-9
> Total: errors=58600734 (1.37%) errors2=0 maxerr=1.45e+00 ulp(s)
>
> Best regards,
> Paul
>
> > Date: Wed, 23 Feb 2022 16:04:23 -0800
> > From: Sunil K Pandey via Libc-alpha <libc-alpha@sourceware.org>
> >
> > This patch adds following input to atanh accuracy test.
> >
> > 0x1.f80094p-8
> >
> > Tested on x86-64 and i686 platforms.
> > Other platforms may have to regenerate ulps file.
> > ---
> > math/auto-libm-test-in | 3 +++
> > math/auto-libm-test-out-atanh | 25 +++++++++++++++++++++++++
> > 2 files changed, 28 insertions(+)
> >
> > diff --git a/math/auto-libm-test-in b/math/auto-libm-test-in
> > index 9080afe4fb..30fbada31f 100644
> > --- a/math/auto-libm-test-in
> > +++ b/math/auto-libm-test-in
> > @@ -617,6 +617,9 @@ atanh -0x3.98eaf4p-4
> > atanh 0x2.c1085p-4
> > atanh 0x1p-500
> > atanh 0x1p-5000
> > +# the next value generates larger error bounds in libmvec/avx512 on x86_64
> > +# (binary32)
> > +atanh 0x1.f80094p-8
> > # the next value generates larger error bounds on x86_64 (binary128)
> > atanh 0x2.c02a24f3472c7840afbd8cfb68bap-4
> > atanh min
> > diff --git a/math/auto-libm-test-out-atanh b/math/auto-libm-test-out-atanh
> > index 378ef6e8cf..a5243264be 100644
> > --- a/math/auto-libm-test-out-atanh
> > +++ b/math/auto-libm-test-out-atanh
> > @@ -3112,6 +3112,31 @@ atanh 0x1p-5000
> > = atanh tonearest binary128 0x1p-5000 : 0x1p-5000 : inexact-ok
> > = atanh towardzero binary128 0x1p-5000 : 0x1p-5000 : inexact-ok
> > = atanh upward binary128 0x1p-5000 : 0x1.0000000000000000000000000001p-5000 : inexact-ok
> > +atanh 0x1.f80094p-8
> > += atanh downward binary32 0x1.f80094p-8 : 0x1.f8031ep-8 : inexact-ok
> > += atanh tonearest binary32 0x1.f80094p-8 : 0x1.f8032p-8 : inexact-ok
> > += atanh towardzero binary32 0x1.f80094p-8 : 0x1.f8031ep-8 : inexact-ok
> > += atanh upward binary32 0x1.f80094p-8 : 0x1.f8032p-8 : inexact-ok
> > += atanh downward binary64 0x1.f80094p-8 : 0x1.f8031f3228153p-8 : inexact-ok
> > += atanh tonearest binary64 0x1.f80094p-8 : 0x1.f8031f3228154p-8 : inexact-ok
> > += atanh towardzero binary64 0x1.f80094p-8 : 0x1.f8031f3228153p-8 : inexact-ok
> > += atanh upward binary64 0x1.f80094p-8 : 0x1.f8031f3228154p-8 : inexact-ok
> > += atanh downward intel96 0x1.f80094p-8 : 0x1.f8031f3228153f0ep-8 : inexact-ok
> > += atanh tonearest intel96 0x1.f80094p-8 : 0x1.f8031f3228153f0ep-8 : inexact-ok
> > += atanh towardzero intel96 0x1.f80094p-8 : 0x1.f8031f3228153f0ep-8 : inexact-ok
> > += atanh upward intel96 0x1.f80094p-8 : 0x1.f8031f3228153f1p-8 : inexact-ok
> > += atanh downward m68k96 0x1.f80094p-8 : 0x1.f8031f3228153f0ep-8 : inexact-ok
> > += atanh tonearest m68k96 0x1.f80094p-8 : 0x1.f8031f3228153f0ep-8 : inexact-ok
> > += atanh towardzero m68k96 0x1.f80094p-8 : 0x1.f8031f3228153f0ep-8 : inexact-ok
> > += atanh upward m68k96 0x1.f80094p-8 : 0x1.f8031f3228153f1p-8 : inexact-ok
> > += atanh downward binary128 0x1.f80094p-8 : 0x1.f8031f3228153f0e56e4db72d2afp-8 : inexact-ok
> > += atanh tonearest binary128 0x1.f80094p-8 : 0x1.f8031f3228153f0e56e4db72d2bp-8 : inexact-ok
> > += atanh towardzero binary128 0x1.f80094p-8 : 0x1.f8031f3228153f0e56e4db72d2afp-8 : inexact-ok
> > += atanh upward binary128 0x1.f80094p-8 : 0x1.f8031f3228153f0e56e4db72d2bp-8 : inexact-ok
> > += atanh downward ibm128 0x1.f80094p-8 : 0x1.f8031f3228153f0e56e4db72d28p-8 : inexact-ok
> > += atanh tonearest ibm128 0x1.f80094p-8 : 0x1.f8031f3228153f0e56e4db72d28p-8 : inexact-ok
> > += atanh towardzero ibm128 0x1.f80094p-8 : 0x1.f8031f3228153f0e56e4db72d28p-8 : inexact-ok
> > += atanh upward ibm128 0x1.f80094p-8 : 0x1.f8031f3228153f0e56e4db72d3p-8 : inexact-ok
> > atanh 0x2.c02a24f3472c7840afbd8cfb68bap-4
> > = atanh downward binary32 0x2.c02a28p-4 : 0x2.c73a3cp-4 : inexact-ok
> > = atanh tonearest binary32 0x2.c02a28p-4 : 0x2.c73a3cp-4 : inexact-ok
> > --
> > 2.34.1
> >
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH v2] math: Add more input to atanh accuracy tests
2022-02-24 15:57 ` Sunil Pandey
@ 2022-02-24 16:13 ` Paul Zimmermann
2022-02-24 16:31 ` Sunil Pandey
0 siblings, 1 reply; 11+ messages in thread
From: Paul Zimmermann @ 2022-02-24 16:13 UTC (permalink / raw)
To: Sunil Pandey; +Cc: libc-alpha
Dear Sunil,
I confirm:
pzimmermann@grvingt-63:~/svn/tbd/20/src/binary32_exhaustive$ LIBMVEC=512 GLIBC=glibc ./doit.libmvec atanh
LIBMVEC=512 -mavx512f
00000000004148f0 T mpfr_atanh
0000000000401668 t mpfr_atanh.cold
U _ZGVeN16v_atanhf@GLIBC_2.35
Checking atanh with libmvec from glibc and rndn
Thu 24 Feb 2022 05:07:33 PM CET
MPFR library: 4.1.0
MPFR header: 4.1.0 (based on 4.1.0)
Checking function atanhf with MPFR_RNDN
libm wrong by up to 2.41e+00 ulp(s) [2] for x=0x1.f80094p-8
atanh gives 0x1.f80324p-8
mpfr_atanh gives 0x1.f8032p-8
Total: errors=63814706 (1.49%) errors2=317192 maxerr=2.41e+00 ulp(s)
then maybe the auto-libm-test-in change should be included in the patch
to svml_s_atanhf16_core_avx512.S if you plan to submit it?
Best regards,
Paul
> From: Sunil Pandey <skpgkp2@gmail.com>
> Date: Thu, 24 Feb 2022 07:57:03 -0800
> Cc: GNU C Library <libc-alpha@sourceware.org>
>
> On Thu, Feb 24, 2022 at 1:37 AM Paul Zimmermann
> <Paul.Zimmermann@inria.fr> wrote:
> >
> > Dear Sunil,
> >
> > I cannot reproduce the error of 2.4 ulps with 0x1.f80094p-8, the maximal
> > error I get is 1.45 ulps (with master revision b98d0bb):
> >
> Hi Paul,
>
> Please try this one line patch on glibc master. In our testing, before
> this patch accuracy for input 0x1.f80094p-8 was ~1.4, after this patch
> accuracy for input 0x1.f80094p-8 jumps to 2.4 and it fails. None of
> the existing inputs catch this accuracy error jump.
>
> commit c55a882ac9fbe9241cd0537affdbdb35a7a4b6e4 (HEAD ->
> users/goldsteinn/atanhf-testable,
> origin/users/goldsteinn/atanhf-testable)
> Author: Noah Goldstein <goldstein.w.n@gmail.com>
> Date: Mon Jan 31 23:00:28 2022 -0600
>
> Does this have any bugs
>
> diff --git a/sysdeps/x86_64/fpu/multiarch/svml_s_atanhf16_core_avx512.S
> b/sysdeps/x86_64/fpu/multiarch/svml_s_atanhf16_core_avx512.S
> index f863f4f959..064424b977 100644
> --- a/sysdeps/x86_64/fpu/multiarch/svml_s_atanhf16_core_avx512.S
> +++ b/sysdeps/x86_64/fpu/multiarch/svml_s_atanhf16_core_avx512.S
> @@ -148,7 +148,7 @@ ENTRY(_ZGVeN16v_atanhf_skx)
> vfmadd213ps {rn-sae}, %zmm5, %zmm3, %zmm1
> vmovups poly_coeff2+__svml_satanh_data_internal_avx512(%rip), %zmm3
> vmovaps %zmm3, %zmm2
> - vfmadd231ps {rn-sae}, %zmm9, %zmm7, %zmm2
> +// vfmadd231ps {rn-sae}, %zmm9, %zmm7, %zmm2
> vfmadd231ps {rn-sae}, %zmm4, %zmm7, %zmm3
> vfmadd213ps {rn-sae}, %zmm12, %zmm9, %zmm2
> vfmadd213ps {rn-sae}, %zmm12, %zmm4, %zmm3
>
> Thanks,
> Sunil
>
> > pzimmermann@grvingt-63:~/svn/tbd/20/src/binary32_exhaustive$ LIBMVEC=512 GLIBC=glibc ./doit.libmvec atanh
> > LIBMVEC=512 -mavx512f
> > 00000000004148f0 T mpfr_atanh
> > 0000000000401668 t mpfr_atanh.cold
> > U _ZGVeN16v_atanhf@GLIBC_2.35
> > Checking atanh with libmvec from glibc and rndn
> > Thu 24 Feb 2022 10:28:21 AM CET
> > MPFR library: 4.1.0
> > MPFR header: 4.1.0 (based on 4.1.0)
> > Checking function atanhf with MPFR_RNDN
> > libm wrong by up to 1.45e+00 ulp(s) [1] for x=0x1.f2100ap-9
> > atanh gives 0x1.f210aap-9
> > mpfr_atanh gives 0x1.f210a8p-9
> > Total: errors=58600734 (1.37%) errors2=0 maxerr=1.45e+00 ulp(s)
> >
> > Best regards,
> > Paul
> >
> > > Date: Wed, 23 Feb 2022 16:04:23 -0800
> > > From: Sunil K Pandey via Libc-alpha <libc-alpha@sourceware.org>
> > >
> > > This patch adds following input to atanh accuracy test.
> > >
> > > 0x1.f80094p-8
> > >
> > > Tested on x86-64 and i686 platforms.
> > > Other platforms may have to regenerate ulps file.
> > > ---
> > > math/auto-libm-test-in | 3 +++
> > > math/auto-libm-test-out-atanh | 25 +++++++++++++++++++++++++
> > > 2 files changed, 28 insertions(+)
> > >
> > > diff --git a/math/auto-libm-test-in b/math/auto-libm-test-in
> > > index 9080afe4fb..30fbada31f 100644
> > > --- a/math/auto-libm-test-in
> > > +++ b/math/auto-libm-test-in
> > > @@ -617,6 +617,9 @@ atanh -0x3.98eaf4p-4
> > > atanh 0x2.c1085p-4
> > > atanh 0x1p-500
> > > atanh 0x1p-5000
> > > +# the next value generates larger error bounds in libmvec/avx512 on x86_64
> > > +# (binary32)
> > > +atanh 0x1.f80094p-8
> > > # the next value generates larger error bounds on x86_64 (binary128)
> > > atanh 0x2.c02a24f3472c7840afbd8cfb68bap-4
> > > atanh min
> > > diff --git a/math/auto-libm-test-out-atanh b/math/auto-libm-test-out-atanh
> > > index 378ef6e8cf..a5243264be 100644
> > > --- a/math/auto-libm-test-out-atanh
> > > +++ b/math/auto-libm-test-out-atanh
> > > @@ -3112,6 +3112,31 @@ atanh 0x1p-5000
> > > = atanh tonearest binary128 0x1p-5000 : 0x1p-5000 : inexact-ok
> > > = atanh towardzero binary128 0x1p-5000 : 0x1p-5000 : inexact-ok
> > > = atanh upward binary128 0x1p-5000 : 0x1.0000000000000000000000000001p-5000 : inexact-ok
> > > +atanh 0x1.f80094p-8
> > > += atanh downward binary32 0x1.f80094p-8 : 0x1.f8031ep-8 : inexact-ok
> > > += atanh tonearest binary32 0x1.f80094p-8 : 0x1.f8032p-8 : inexact-ok
> > > += atanh towardzero binary32 0x1.f80094p-8 : 0x1.f8031ep-8 : inexact-ok
> > > += atanh upward binary32 0x1.f80094p-8 : 0x1.f8032p-8 : inexact-ok
> > > += atanh downward binary64 0x1.f80094p-8 : 0x1.f8031f3228153p-8 : inexact-ok
> > > += atanh tonearest binary64 0x1.f80094p-8 : 0x1.f8031f3228154p-8 : inexact-ok
> > > += atanh towardzero binary64 0x1.f80094p-8 : 0x1.f8031f3228153p-8 : inexact-ok
> > > += atanh upward binary64 0x1.f80094p-8 : 0x1.f8031f3228154p-8 : inexact-ok
> > > += atanh downward intel96 0x1.f80094p-8 : 0x1.f8031f3228153f0ep-8 : inexact-ok
> > > += atanh tonearest intel96 0x1.f80094p-8 : 0x1.f8031f3228153f0ep-8 : inexact-ok
> > > += atanh towardzero intel96 0x1.f80094p-8 : 0x1.f8031f3228153f0ep-8 : inexact-ok
> > > += atanh upward intel96 0x1.f80094p-8 : 0x1.f8031f3228153f1p-8 : inexact-ok
> > > += atanh downward m68k96 0x1.f80094p-8 : 0x1.f8031f3228153f0ep-8 : inexact-ok
> > > += atanh tonearest m68k96 0x1.f80094p-8 : 0x1.f8031f3228153f0ep-8 : inexact-ok
> > > += atanh towardzero m68k96 0x1.f80094p-8 : 0x1.f8031f3228153f0ep-8 : inexact-ok
> > > += atanh upward m68k96 0x1.f80094p-8 : 0x1.f8031f3228153f1p-8 : inexact-ok
> > > += atanh downward binary128 0x1.f80094p-8 : 0x1.f8031f3228153f0e56e4db72d2afp-8 : inexact-ok
> > > += atanh tonearest binary128 0x1.f80094p-8 : 0x1.f8031f3228153f0e56e4db72d2bp-8 : inexact-ok
> > > += atanh towardzero binary128 0x1.f80094p-8 : 0x1.f8031f3228153f0e56e4db72d2afp-8 : inexact-ok
> > > += atanh upward binary128 0x1.f80094p-8 : 0x1.f8031f3228153f0e56e4db72d2bp-8 : inexact-ok
> > > += atanh downward ibm128 0x1.f80094p-8 : 0x1.f8031f3228153f0e56e4db72d28p-8 : inexact-ok
> > > += atanh tonearest ibm128 0x1.f80094p-8 : 0x1.f8031f3228153f0e56e4db72d28p-8 : inexact-ok
> > > += atanh towardzero ibm128 0x1.f80094p-8 : 0x1.f8031f3228153f0e56e4db72d28p-8 : inexact-ok
> > > += atanh upward ibm128 0x1.f80094p-8 : 0x1.f8031f3228153f0e56e4db72d3p-8 : inexact-ok
> > > atanh 0x2.c02a24f3472c7840afbd8cfb68bap-4
> > > = atanh downward binary32 0x2.c02a28p-4 : 0x2.c73a3cp-4 : inexact-ok
> > > = atanh tonearest binary32 0x2.c02a28p-4 : 0x2.c73a3cp-4 : inexact-ok
> > > --
> > > 2.34.1
> > >
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH v2] math: Add more input to atanh accuracy tests
2022-02-24 16:13 ` Paul Zimmermann
@ 2022-02-24 16:31 ` Sunil Pandey
2022-02-24 16:38 ` Paul Zimmermann
0 siblings, 1 reply; 11+ messages in thread
From: Sunil Pandey @ 2022-02-24 16:31 UTC (permalink / raw)
To: Paul Zimmermann; +Cc: GNU C Library
On Thu, Feb 24, 2022 at 8:13 AM Paul Zimmermann
<Paul.Zimmermann@inria.fr> wrote:
>
> Dear Sunil,
>
> I confirm:
>
> pzimmermann@grvingt-63:~/svn/tbd/20/src/binary32_exhaustive$ LIBMVEC=512 GLIBC=glibc ./doit.libmvec atanh
> LIBMVEC=512 -mavx512f
> 00000000004148f0 T mpfr_atanh
> 0000000000401668 t mpfr_atanh.cold
> U _ZGVeN16v_atanhf@GLIBC_2.35
> Checking atanh with libmvec from glibc and rndn
> Thu 24 Feb 2022 05:07:33 PM CET
> MPFR library: 4.1.0
> MPFR header: 4.1.0 (based on 4.1.0)
> Checking function atanhf with MPFR_RNDN
> libm wrong by up to 2.41e+00 ulp(s) [2] for x=0x1.f80094p-8
> atanh gives 0x1.f80324p-8
> mpfr_atanh gives 0x1.f8032p-8
> Total: errors=63814706 (1.49%) errors2=317192 maxerr=2.41e+00 ulp(s)
>
> then maybe the auto-libm-test-in change should be included in the patch
> to svml_s_atanhf16_core_avx512.S if you plan to submit it?
>
Hi Paul,
I do not plan this patch(svml_s_atanhf16_core_avx512.S) to be
submitted, but I want this
input(0x1.f80094p-8) to be included in auto-libm-test-in, as it
can help as a checkguard for
changes like this in future.
Thanks,
Sunil
> Best regards,
> Paul
>
> > From: Sunil Pandey <skpgkp2@gmail.com>
> > Date: Thu, 24 Feb 2022 07:57:03 -0800
> > Cc: GNU C Library <libc-alpha@sourceware.org>
> >
> > On Thu, Feb 24, 2022 at 1:37 AM Paul Zimmermann
> > <Paul.Zimmermann@inria.fr> wrote:
> > >
> > > Dear Sunil,
> > >
> > > I cannot reproduce the error of 2.4 ulps with 0x1.f80094p-8, the maximal
> > > error I get is 1.45 ulps (with master revision b98d0bb):
> > >
> > Hi Paul,
> >
> > Please try this one line patch on glibc master. In our testing, before
> > this patch accuracy for input 0x1.f80094p-8 was ~1.4, after this patch
> > accuracy for input 0x1.f80094p-8 jumps to 2.4 and it fails. None of
> > the existing inputs catch this accuracy error jump.
> >
> > commit c55a882ac9fbe9241cd0537affdbdb35a7a4b6e4 (HEAD ->
> > users/goldsteinn/atanhf-testable,
> > origin/users/goldsteinn/atanhf-testable)
> > Author: Noah Goldstein <goldstein.w.n@gmail.com>
> > Date: Mon Jan 31 23:00:28 2022 -0600
> >
> > Does this have any bugs
> >
> > diff --git a/sysdeps/x86_64/fpu/multiarch/svml_s_atanhf16_core_avx512.S
> > b/sysdeps/x86_64/fpu/multiarch/svml_s_atanhf16_core_avx512.S
> > index f863f4f959..064424b977 100644
> > --- a/sysdeps/x86_64/fpu/multiarch/svml_s_atanhf16_core_avx512.S
> > +++ b/sysdeps/x86_64/fpu/multiarch/svml_s_atanhf16_core_avx512.S
> > @@ -148,7 +148,7 @@ ENTRY(_ZGVeN16v_atanhf_skx)
> > vfmadd213ps {rn-sae}, %zmm5, %zmm3, %zmm1
> > vmovups poly_coeff2+__svml_satanh_data_internal_avx512(%rip), %zmm3
> > vmovaps %zmm3, %zmm2
> > - vfmadd231ps {rn-sae}, %zmm9, %zmm7, %zmm2
> > +// vfmadd231ps {rn-sae}, %zmm9, %zmm7, %zmm2
> > vfmadd231ps {rn-sae}, %zmm4, %zmm7, %zmm3
> > vfmadd213ps {rn-sae}, %zmm12, %zmm9, %zmm2
> > vfmadd213ps {rn-sae}, %zmm12, %zmm4, %zmm3
> >
> > Thanks,
> > Sunil
> >
> > > pzimmermann@grvingt-63:~/svn/tbd/20/src/binary32_exhaustive$ LIBMVEC=512 GLIBC=glibc ./doit.libmvec atanh
> > > LIBMVEC=512 -mavx512f
> > > 00000000004148f0 T mpfr_atanh
> > > 0000000000401668 t mpfr_atanh.cold
> > > U _ZGVeN16v_atanhf@GLIBC_2.35
> > > Checking atanh with libmvec from glibc and rndn
> > > Thu 24 Feb 2022 10:28:21 AM CET
> > > MPFR library: 4.1.0
> > > MPFR header: 4.1.0 (based on 4.1.0)
> > > Checking function atanhf with MPFR_RNDN
> > > libm wrong by up to 1.45e+00 ulp(s) [1] for x=0x1.f2100ap-9
> > > atanh gives 0x1.f210aap-9
> > > mpfr_atanh gives 0x1.f210a8p-9
> > > Total: errors=58600734 (1.37%) errors2=0 maxerr=1.45e+00 ulp(s)
> > >
> > > Best regards,
> > > Paul
> > >
> > > > Date: Wed, 23 Feb 2022 16:04:23 -0800
> > > > From: Sunil K Pandey via Libc-alpha <libc-alpha@sourceware.org>
> > > >
> > > > This patch adds following input to atanh accuracy test.
> > > >
> > > > 0x1.f80094p-8
> > > >
> > > > Tested on x86-64 and i686 platforms.
> > > > Other platforms may have to regenerate ulps file.
> > > > ---
> > > > math/auto-libm-test-in | 3 +++
> > > > math/auto-libm-test-out-atanh | 25 +++++++++++++++++++++++++
> > > > 2 files changed, 28 insertions(+)
> > > >
> > > > diff --git a/math/auto-libm-test-in b/math/auto-libm-test-in
> > > > index 9080afe4fb..30fbada31f 100644
> > > > --- a/math/auto-libm-test-in
> > > > +++ b/math/auto-libm-test-in
> > > > @@ -617,6 +617,9 @@ atanh -0x3.98eaf4p-4
> > > > atanh 0x2.c1085p-4
> > > > atanh 0x1p-500
> > > > atanh 0x1p-5000
> > > > +# the next value generates larger error bounds in libmvec/avx512 on x86_64
> > > > +# (binary32)
> > > > +atanh 0x1.f80094p-8
> > > > # the next value generates larger error bounds on x86_64 (binary128)
> > > > atanh 0x2.c02a24f3472c7840afbd8cfb68bap-4
> > > > atanh min
> > > > diff --git a/math/auto-libm-test-out-atanh b/math/auto-libm-test-out-atanh
> > > > index 378ef6e8cf..a5243264be 100644
> > > > --- a/math/auto-libm-test-out-atanh
> > > > +++ b/math/auto-libm-test-out-atanh
> > > > @@ -3112,6 +3112,31 @@ atanh 0x1p-5000
> > > > = atanh tonearest binary128 0x1p-5000 : 0x1p-5000 : inexact-ok
> > > > = atanh towardzero binary128 0x1p-5000 : 0x1p-5000 : inexact-ok
> > > > = atanh upward binary128 0x1p-5000 : 0x1.0000000000000000000000000001p-5000 : inexact-ok
> > > > +atanh 0x1.f80094p-8
> > > > += atanh downward binary32 0x1.f80094p-8 : 0x1.f8031ep-8 : inexact-ok
> > > > += atanh tonearest binary32 0x1.f80094p-8 : 0x1.f8032p-8 : inexact-ok
> > > > += atanh towardzero binary32 0x1.f80094p-8 : 0x1.f8031ep-8 : inexact-ok
> > > > += atanh upward binary32 0x1.f80094p-8 : 0x1.f8032p-8 : inexact-ok
> > > > += atanh downward binary64 0x1.f80094p-8 : 0x1.f8031f3228153p-8 : inexact-ok
> > > > += atanh tonearest binary64 0x1.f80094p-8 : 0x1.f8031f3228154p-8 : inexact-ok
> > > > += atanh towardzero binary64 0x1.f80094p-8 : 0x1.f8031f3228153p-8 : inexact-ok
> > > > += atanh upward binary64 0x1.f80094p-8 : 0x1.f8031f3228154p-8 : inexact-ok
> > > > += atanh downward intel96 0x1.f80094p-8 : 0x1.f8031f3228153f0ep-8 : inexact-ok
> > > > += atanh tonearest intel96 0x1.f80094p-8 : 0x1.f8031f3228153f0ep-8 : inexact-ok
> > > > += atanh towardzero intel96 0x1.f80094p-8 : 0x1.f8031f3228153f0ep-8 : inexact-ok
> > > > += atanh upward intel96 0x1.f80094p-8 : 0x1.f8031f3228153f1p-8 : inexact-ok
> > > > += atanh downward m68k96 0x1.f80094p-8 : 0x1.f8031f3228153f0ep-8 : inexact-ok
> > > > += atanh tonearest m68k96 0x1.f80094p-8 : 0x1.f8031f3228153f0ep-8 : inexact-ok
> > > > += atanh towardzero m68k96 0x1.f80094p-8 : 0x1.f8031f3228153f0ep-8 : inexact-ok
> > > > += atanh upward m68k96 0x1.f80094p-8 : 0x1.f8031f3228153f1p-8 : inexact-ok
> > > > += atanh downward binary128 0x1.f80094p-8 : 0x1.f8031f3228153f0e56e4db72d2afp-8 : inexact-ok
> > > > += atanh tonearest binary128 0x1.f80094p-8 : 0x1.f8031f3228153f0e56e4db72d2bp-8 : inexact-ok
> > > > += atanh towardzero binary128 0x1.f80094p-8 : 0x1.f8031f3228153f0e56e4db72d2afp-8 : inexact-ok
> > > > += atanh upward binary128 0x1.f80094p-8 : 0x1.f8031f3228153f0e56e4db72d2bp-8 : inexact-ok
> > > > += atanh downward ibm128 0x1.f80094p-8 : 0x1.f8031f3228153f0e56e4db72d28p-8 : inexact-ok
> > > > += atanh tonearest ibm128 0x1.f80094p-8 : 0x1.f8031f3228153f0e56e4db72d28p-8 : inexact-ok
> > > > += atanh towardzero ibm128 0x1.f80094p-8 : 0x1.f8031f3228153f0e56e4db72d28p-8 : inexact-ok
> > > > += atanh upward ibm128 0x1.f80094p-8 : 0x1.f8031f3228153f0e56e4db72d3p-8 : inexact-ok
> > > > atanh 0x2.c02a24f3472c7840afbd8cfb68bap-4
> > > > = atanh downward binary32 0x2.c02a28p-4 : 0x2.c73a3cp-4 : inexact-ok
> > > > = atanh tonearest binary32 0x2.c02a28p-4 : 0x2.c73a3cp-4 : inexact-ok
> > > > --
> > > > 2.34.1
> > > >
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH v2] math: Add more input to atanh accuracy tests
2022-02-24 16:31 ` Sunil Pandey
@ 2022-02-24 16:38 ` Paul Zimmermann
0 siblings, 0 replies; 11+ messages in thread
From: Paul Zimmermann @ 2022-02-24 16:38 UTC (permalink / raw)
To: Sunil Pandey; +Cc: libc-alpha
Dear Sunil,
> I do not plan this patch(svml_s_atanhf16_core_avx512.S) to be
> submitted, but I want this
> input(0x1.f80094p-8) to be included in auto-libm-test-in, as it
> can help as a checkguard for
> changes like this in future.
ok I understand now!
I am ok with this patch.
Reviewed-by: Paul Zimmermann <Paul.Zimmermann@inria.fr>
Best regards,
Paul
^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2022-02-24 16:38 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-02-16 2:57 [PATCH] math: Add more input to atanh accuracy tests Sunil K Pandey
2022-02-16 7:43 ` Paul Zimmermann
2022-02-16 18:40 ` Sunil Pandey
2022-02-19 4:01 ` Paul Zimmermann
2022-02-24 0:04 ` [PATCH v2] " Sunil K Pandey
2022-02-24 9:37 ` Paul Zimmermann
2022-02-24 15:57 ` Sunil Pandey
2022-02-24 16:13 ` Paul Zimmermann
2022-02-24 16:31 ` Sunil Pandey
2022-02-24 16:38 ` Paul Zimmermann
2022-02-24 3:32 ` [PATCH] " Sunil Pandey
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).