mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-08-31 11:58:40 +09:00
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.
This commit is contained in:
parent
ddb27ac3e9
commit
b6c0bdd7da
10 changed files with 17 additions and 459 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue