public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
* [PATCH] [auto-libm-test-in] added pair of inputs for hypotf in binary32
@ 2023-02-12  7:01 Paul Zimmermann
  2023-02-13 17:32 ` Carlos O'Donell
  0 siblings, 1 reply; 2+ messages in thread
From: Paul Zimmermann @ 2023-02-12  7:01 UTC (permalink / raw)
  To: libc-alpha; +Cc: Paul Zimmermann

This pair yields an error of 1 ulp in binary32, whereas the current
maximal known error for hypotf on x86_64 is zero:

Checking hypot with glibc-2.37
hypot 0 -1 -0x1.003222p-20,-0x1.6a2d58p-32 [0.501] 0.500001 0.500000001392678
libm gives 0x1.003224p-20
mpfr gives 0x1.003222p-20

See https://sourceware.org/pipermail/libc-alpha/2023-February/145432.html
and https://sourceware.org/pipermail/libc-alpha/2023-February/145442.html
---
 math/auto-libm-test-in | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/math/auto-libm-test-in b/math/auto-libm-test-in
index 393d9fcfaa..c400cafb4b 100644
--- a/math/auto-libm-test-in
+++ b/math/auto-libm-test-in
@@ -5773,6 +5773,8 @@ hypot 0x1p-16384 0x1p-16446
 hypot 0x1p-16383 0x1p-16494
 
 hypot -0x1.fa7deap+0 0x1.a761bab383ac8p+0
+# the following inputs yield an error of 1 ulp on x86_64 in binary32
+hypot -0x1.003222p-20 -0x1.6a2d58p-32
 
 j0 -1.0
 j0 0.0
-- 
2.39.1


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

* Re: [PATCH] [auto-libm-test-in] added pair of inputs for hypotf in binary32
  2023-02-12  7:01 [PATCH] [auto-libm-test-in] added pair of inputs for hypotf in binary32 Paul Zimmermann
@ 2023-02-13 17:32 ` Carlos O'Donell
  0 siblings, 0 replies; 2+ messages in thread
From: Carlos O'Donell @ 2023-02-13 17:32 UTC (permalink / raw)
  To: Paul Zimmermann, libc-alpha

On 2/12/23 02:01, Paul Zimmermann via Libc-alpha wrote:
> This pair yields an error of 1 ulp in binary32, whereas the current
> maximal known error for hypotf on x86_64 is zero:
> 
> Checking hypot with glibc-2.37
> hypot 0 -1 -0x1.003222p-20,-0x1.6a2d58p-32 [0.501] 0.500001 0.500000001392678
> libm gives 0x1.003224p-20
> mpfr gives 0x1.003222p-20

LGTM. Passed CI for i686. Early in development is a good time to add more inputs.

Reviewed-by: Carlos O'Donell <carlos@redhat.com>


> See https://sourceware.org/pipermail/libc-alpha/2023-February/145432.html
> and https://sourceware.org/pipermail/libc-alpha/2023-February/145442.html
> ---
>  math/auto-libm-test-in | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/math/auto-libm-test-in b/math/auto-libm-test-in
> index 393d9fcfaa..c400cafb4b 100644
> --- a/math/auto-libm-test-in
> +++ b/math/auto-libm-test-in
> @@ -5773,6 +5773,8 @@ hypot 0x1p-16384 0x1p-16446
>  hypot 0x1p-16383 0x1p-16494
>  
>  hypot -0x1.fa7deap+0 0x1.a761bab383ac8p+0
> +# the following inputs yield an error of 1 ulp on x86_64 in binary32
> +hypot -0x1.003222p-20 -0x1.6a2d58p-32

OK. Double checked results.

Notes:
hypot(-0x1.003222p-20, -0x1.6a2d58p-32) == 0x1.003222fffffffp-20

>  
>  j0 -1.0
>  j0 0.0

-- 
Cheers,
Carlos.


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

end of thread, other threads:[~2023-02-13 17:32 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-02-12  7:01 [PATCH] [auto-libm-test-in] added pair of inputs for hypotf in binary32 Paul Zimmermann
2023-02-13 17:32 ` Carlos O'Donell

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