From 6ca0b4704367f8804e0373cb439e6e17e5146e4a Mon Sep 17 00:00:00 2001 From: wolfbeast Date: Fri, 15 Nov 2019 14:00:18 +0100 Subject: Issue #1291 - Part 2: Stop using the lib's sqrt() function Use 's functions over fdlibm's for performance reasons. No significant precision loss when doing this. --- modules/fdlibm/src/e_asin.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'modules/fdlibm/src/e_asin.cpp') 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 #include #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); -- cgit v1.2.3 From 5e902a4a9a25a9e151b5d3945c68517bc0c73139 Mon Sep 17 00:00:00 2001 From: wolfbeast Date: Fri, 15 Nov 2019 15:17:01 +0100 Subject: Issue #1291 - Part 3: Update fdlibm to Sept 2019 version --- modules/fdlibm/src/e_asin.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'modules/fdlibm/src/e_asin.cpp') diff --git a/modules/fdlibm/src/e_asin.cpp b/modules/fdlibm/src/e_asin.cpp index 98607937d..e896bde9e 100644 --- a/modules/fdlibm/src/e_asin.cpp +++ b/modules/fdlibm/src/e_asin.cpp @@ -6,7 +6,7 @@ * * Developed at SunSoft, a Sun Microsystems, Inc. business. * Permission to use, copy, modify, and distribute this - * software is freely granted, provided that this notice + * software is freely granted, provided that this notice * is preserved. * ==================================================== */ -- cgit v1.2.3