Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 06 Feb 2021 21:49:37 +0000
From:      bugzilla-noreply@freebsd.org
To:        bugs@FreeBSD.org
Subject:   [Bug 253313] lib/msun: hypotl(3) mishandles subnormal numbers
Message-ID:  <bug-253313-227-uKFYyVdeCU@https.bugs.freebsd.org/bugzilla/>
In-Reply-To: <bug-253313-227@https.bugs.freebsd.org/bugzilla/>
References:  <bug-253313-227@https.bugs.freebsd.org/bugzilla/>

next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D253313

--- Comment #1 from Dimitry Andric <dim@FreeBSD.org> ---
Another interesting detail, if I recompile libm's e_hypotl.c with gcc 10.2 =
and
link it into libm.so, the result from the earlier z-amd64 executable become=
s:

% LD_LIBRARY_PATH=3D/usr/obj/usr/src/amd64.amd64/lib/msun
/share/dim/bugs/bug253313/z-amd64
Via scaling and sqrtl
x=3D2.853684e-4932 y=3D1.444012e-4922 a=3D1.444012e-4922
x=3D0x1.b2933cafa0bb7p-16383 y=3D0x1.fffffffffffffp-16351
a=3D0x1.000000006ca4c72cp-16350

Via hypotl
x=3D2.853684e-4932 y=3D1.444012e-4922 z=3D0.000000e+00
x=3D0x1.b2933cafa0bb7p-16383 y=3D0x1.fffffffffffffp-16351 z=3D0x0p+0

so now hypotl doesn't result in nan, but zero isn't right either, I guess...

Interestingly the glibc and msun hypotl code seem to have the same Sun
Microsystems origin, but have diverged quite a bit. Hard to tell from a sim=
ple
viewing what causes this difference.

--=20
You are receiving this mail because:
You are the assignee for the bug.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-253313-227-uKFYyVdeCU>