mirror of
https://git.planet-casio.com/Lephenixnoir/OpenLibm.git
synced 2024-12-28 04:23:41 +01:00
Merge pull request #228 from JuliaMath/aa/hypotl
Fix incorrect results in `hypotl` near underflow
This commit is contained in:
commit
f052f42bb3
1 changed files with 1 additions and 1 deletions
|
@ -82,7 +82,7 @@ hypotl(long double x, long double y)
|
||||||
man_t manh, manl;
|
man_t manh, manl;
|
||||||
GET_LDBL_MAN(manh,manl,b);
|
GET_LDBL_MAN(manh,manl,b);
|
||||||
if((manh|manl)==0) return a;
|
if((manh|manl)==0) return a;
|
||||||
t1=0;
|
t1=1;
|
||||||
SET_HIGH_WORD(t1,ESW(MAX_EXP-2)); /* t1=2^(MAX_EXP-2) */
|
SET_HIGH_WORD(t1,ESW(MAX_EXP-2)); /* t1=2^(MAX_EXP-2) */
|
||||||
b *= t1;
|
b *= t1;
|
||||||
a *= t1;
|
a *= t1;
|
||||||
|
|
Loading…
Reference in a new issue