]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Fix incorrect hypotl(3) result with subnormal numbers
authorDimitry Andric <dim@FreeBSD.org>
Wed, 10 Feb 2021 22:28:43 +0000 (23:28 +0100)
committerDimitry Andric <dim@FreeBSD.org>
Thu, 18 Feb 2021 18:10:32 +0000 (19:10 +0100)
commitbe49cd3ec6a53aa6b0b5c5635202dd92bcaacfc6
treeacea47de7663ad5a68f1639e6ae7e8bebe582fae
parent3ea88413d607eea79450cb6570e9a8c6067dd9ae
Fix incorrect hypotl(3) result with subnormal numbers

This adjusts the factor used to scale the subnormal numbers, so it
becomes the right value after adjusting its exponent. Thanks to Steve
Kargl for finding the most elegant fix.

Also enable the hypot tests, and add a test case for this bug.

PR:             253313

(cherry picked from commit d3338f3355a612cf385632291f46c5777bba8d18)

Fix lib/msun/test builds on platforms without 80-bit long doubles

After d3338f3355a612cf385632291f46c5777bba8d18, the lib/msun test case
'hypotl_near_underflow' would fail to compile on platforms where long
doubles weren't 80 bit, like on x86. Disable this particular test on
such platforms for now.

PR:             253313

(cherry picked from commit 25120662284466ecef976df8f86e97bafdedf991)
contrib/netbsd-tests/lib/libm/t_hypot.c
lib/msun/src/e_hypotl.c
lib/msun/tests/Makefile