Skip to content

Commit f052f42

Browse files
authored
Merge pull request #228 from JuliaMath/aa/hypotl
Fix incorrect results in `hypotl` near underflow
2 parents aeab19f + 711654e commit f052f42

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/e_hypotl.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ hypotl(long double x, long double y)
8282
man_t manh, manl;
8383
GET_LDBL_MAN(manh,manl,b);
8484
if((manh|manl)==0) return a;
85-
t1=0;
85+
t1=1;
8686
SET_HIGH_WORD(t1,ESW(MAX_EXP-2)); /* t1=2^(MAX_EXP-2) */
8787
b *= t1;
8888
a *= t1;

0 commit comments

Comments
 (0)