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/>
index | next in thread | previous in thread | raw e-mail
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=253313 --- 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 becomes: % LD_LIBRARY_PATH=/usr/obj/usr/src/amd64.amd64/lib/msun /share/dim/bugs/bug253313/z-amd64 Via scaling and sqrtl x=2.853684e-4932 y=1.444012e-4922 a=1.444012e-4922 x=0x1.b2933cafa0bb7p-16383 y=0x1.fffffffffffffp-16351 a=0x1.000000006ca4c72cp-16350 Via hypotl x=2.853684e-4932 y=1.444012e-4922 z=0.000000e+00 x=0x1.b2933cafa0bb7p-16383 y=0x1.fffffffffffffp-16351 z=0x0p+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 simple viewing what causes this difference. -- You are receiving this mail because: You are the assignee for the bug.help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-253313-227-uKFYyVdeCU>
