summaryrefslogtreecommitdiffstats
path: root/modules/fdlibm/src/e_asin.cpp
diff options
context:
space:
mode:
authorwolfbeast <mcwerewolf@wolfbeast.com>2019-11-15 14:00:18 +0100
committerwolfbeast <mcwerewolf@wolfbeast.com>2019-11-15 14:00:18 +0100
commit6ca0b4704367f8804e0373cb439e6e17e5146e4a (patch)
tree31ce5042bb575dd1afd6d309467c0c0d36e18914 /modules/fdlibm/src/e_asin.cpp
parent85c60f94fb584ecab49743ab533e56f0f9981ecc (diff)
downloadUXP-6ca0b4704367f8804e0373cb439e6e17e5146e4a.tar
UXP-6ca0b4704367f8804e0373cb439e6e17e5146e4a.tar.gz
UXP-6ca0b4704367f8804e0373cb439e6e17e5146e4a.tar.lz
UXP-6ca0b4704367f8804e0373cb439e6e17e5146e4a.tar.xz
UXP-6ca0b4704367f8804e0373cb439e6e17e5146e4a.zip
Issue #1291 - Part 2: Stop using the lib's sqrt() function
Use <cmath>'s functions over fdlibm's for performance reasons. No significant precision loss when doing this.
Diffstat (limited to 'modules/fdlibm/src/e_asin.cpp')
-rw-r--r--modules/fdlibm/src/e_asin.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/modules/fdlibm/src/e_asin.cpp b/modules/fdlibm/src/e_asin.cpp
index 396f49449..98607937d 100644
--- a/modules/fdlibm/src/e_asin.cpp
+++ b/modules/fdlibm/src/e_asin.cpp
@@ -44,6 +44,7 @@
*
*/
+#include <cmath>
#include <float.h>
#include "math_private.h"
@@ -95,7 +96,7 @@ __ieee754_asin(double x)
t = w*0.5;
p = t*(pS0+t*(pS1+t*(pS2+t*(pS3+t*(pS4+t*pS5)))));
q = one+t*(qS1+t*(qS2+t*(qS3+t*qS4)));
- s = sqrt(t);
+ s = std::sqrt(t);
if(ix>=0x3FEF3333) { /* if |x| > 0.975 */
w = p/q;
t = pio2_hi-(2.0*(s+s*w)-pio2_lo);