-
Notifications
You must be signed in to change notification settings - Fork 137
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
wrong hypotl result near underflow #224
Comments
This patch fixes the issue of FreeBSD, which is the source of e_hypothl.c. t1 is intended to scale subnormal numbers, but t1=1 is needed instead of t1=0 when preparing the scaling. Don't know how to generate a pull request.
|
I confirm this fixes the issue, thanks! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
with the attached program I get with OpenLibm 0.7.4:
$ gcc -fno-builtin test_hypot_openlibm.c /localdisk/zimmerma/openlibm-0.7.4/libopenlibm.a
$ ./a.out
x=0x6.ca4cf2be82edcp-16385 y=0xf.ffffffffffff8p-16354 z=0x0p+0
whereas the GNU libc gives:
$ ./a.out
x=0x6.ca4cf2be82edcp-16385 y=0xf.ffffffffffff8p-16354 z=0xf.ffffffffffff8p-16354
Obviously hypot(x,y) >= |y|, and thus cannot be zero.
test_hypot_openlibm.c.gz
The text was updated successfully, but these errors were encountered: