Merge pull request #228 from JuliaMath/aa/hypotl

Fix incorrect results in `hypotl` near underflow
This commit is contained in:
Elliot Saba 2021-02-17 09:04:36 -08:00 committed by GitHub
commit f052f42bb3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -82,7 +82,7 @@ hypotl(long double x, long double y)
man_t manh, manl;
GET_LDBL_MAN(manh,manl,b);
if((manh|manl)==0) return a;
t1=0;
t1=1;
SET_HIGH_WORD(t1,ESW(MAX_EXP-2)); /* t1=2^(MAX_EXP-2) */
b *= t1;
a *= t1;