diff options
author | Matt A. Tobin <email@mattatobin.com> | 2019-11-15 17:37:54 -0500 |
---|---|---|
committer | Matt A. Tobin <email@mattatobin.com> | 2019-11-15 17:37:54 -0500 |
commit | 556349010e01d0a3b7896f858d503781ea837b46 (patch) | |
tree | f003183732dc3cda4ad880407880da282ca4b0c5 /modules/fdlibm/src/e_hypot.cpp | |
parent | f3d462c6049bd2f35571c2a0e2a7c4df4f3ca81c (diff) | |
parent | 3492ad65236209e741ca3641789efeaa22a6b8a4 (diff) | |
download | UXP-556349010e01d0a3b7896f858d503781ea837b46.tar UXP-556349010e01d0a3b7896f858d503781ea837b46.tar.gz UXP-556349010e01d0a3b7896f858d503781ea837b46.tar.lz UXP-556349010e01d0a3b7896f858d503781ea837b46.tar.xz UXP-556349010e01d0a3b7896f858d503781ea837b46.zip |
Merge branch 'master' into mailnews-work
Diffstat (limited to 'modules/fdlibm/src/e_hypot.cpp')
-rw-r--r-- | modules/fdlibm/src/e_hypot.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/modules/fdlibm/src/e_hypot.cpp b/modules/fdlibm/src/e_hypot.cpp index f5c7037bb..a23571150 100644 --- a/modules/fdlibm/src/e_hypot.cpp +++ b/modules/fdlibm/src/e_hypot.cpp @@ -46,6 +46,7 @@ * than 1 ulps (units in the last place) */ +#include <cmath> #include <float.h> #include "math_private.h" @@ -69,7 +70,7 @@ __ieee754_hypot(double x, double y) if(ha >= 0x7ff00000) { /* Inf or NaN */ u_int32_t low; /* Use original arg order iff result is NaN; quieten sNaNs. */ - w = fabs(x+0.0)-fabs(y+0.0); + w = fabsl(x+0.0L)-fabs(y+0); GET_LOW_WORD(low,a); if(((ha&0xfffff)|low)==0) w = a; GET_LOW_WORD(low,b); @@ -105,7 +106,7 @@ __ieee754_hypot(double x, double y) t1 = 0; SET_HIGH_WORD(t1,ha); t2 = a-t1; - w = sqrt(t1*t1-(b*(-b)-t2*(a+t1))); + w = std::sqrt(t1*t1-(b*(-b)-t2*(a+t1))); } else { a = a+a; y1 = 0; @@ -114,7 +115,7 @@ __ieee754_hypot(double x, double y) t1 = 0; SET_HIGH_WORD(t1,ha+0x00100000); t2 = a - t1; - w = sqrt(t1*y1-(w*(-w)-(t1*y2+t2*b))); + w = std::sqrt(t1*y1-(w*(-w)-(t1*y2+t2*b))); } if(k!=0) { u_int32_t high; |