summaryrefslogtreecommitdiffstats
path: root/modules/fdlibm/src/e_acos.cpp
diff options
context:
space:
mode:
authorwolfbeast <mcwerewolf@wolfbeast.com>2019-11-15 15:25:14 +0100
committerwolfbeast <mcwerewolf@wolfbeast.com>2019-11-15 15:25:48 +0100
commit3492ad65236209e741ca3641789efeaa22a6b8a4 (patch)
tree2db061bafcebcac423ca7deeb152435c44944419 /modules/fdlibm/src/e_acos.cpp
parent2057abd196545ddf8c85ab83e7d220367af8b276 (diff)
parent59f4de4c45e126f5f20633808ce28548d5879b16 (diff)
downloadUXP-3492ad65236209e741ca3641789efeaa22a6b8a4.tar
UXP-3492ad65236209e741ca3641789efeaa22a6b8a4.tar.gz
UXP-3492ad65236209e741ca3641789efeaa22a6b8a4.tar.lz
UXP-3492ad65236209e741ca3641789efeaa22a6b8a4.tar.xz
UXP-3492ad65236209e741ca3641789efeaa22a6b8a4.zip
Merge branch 'fdlibm-work'
This resolves #1291
Diffstat (limited to 'modules/fdlibm/src/e_acos.cpp')
-rw-r--r--modules/fdlibm/src/e_acos.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/modules/fdlibm/src/e_acos.cpp b/modules/fdlibm/src/e_acos.cpp
index 12be296cb..4f497b3b3 100644
--- a/modules/fdlibm/src/e_acos.cpp
+++ b/modules/fdlibm/src/e_acos.cpp
@@ -38,6 +38,7 @@
* Function needed: sqrt
*/
+#include <cmath>
#include <float.h>
#include "math_private.h"
@@ -87,13 +88,13 @@ __ieee754_acos(double x)
z = (one+x)*0.5;
p = z*(pS0+z*(pS1+z*(pS2+z*(pS3+z*(pS4+z*pS5)))));
q = one+z*(qS1+z*(qS2+z*(qS3+z*qS4)));
- s = sqrt(z);
+ s = std::sqrt(z);
r = p/q;
w = r*s-pio2_lo;
return pi - 2.0*(s+w);
} else { /* x > 0.5 */
z = (one-x)*0.5;
- s = sqrt(z);
+ s = std::sqrt(z);
df = s;
SET_LOW_WORD(df,0);
c = (z-df*df)/(s+df);