18_use_stdlib_sqrt.patch (3680B)
1 diff --git a/e_acos.cpp b/e_acos.cpp 2 --- a/e_acos.cpp 3 +++ b/e_acos.cpp 4 @@ -34,16 +34,17 @@ 5 * Special cases: 6 * if x is NaN, return x itself; 7 * if |x|>1, return NaN with invalid signal. 8 * 9 * Function needed: sqrt 10 */ 11 12 #include <float.h> 13 +#include <math.h> 14 15 #include "math_private.h" 16 17 static const double 18 one= 1.00000000000000000000e+00, /* 0x3FF00000, 0x00000000 */ 19 pi = 3.14159265358979311600e+00, /* 0x400921FB, 0x54442D18 */ 20 pio2_hi = 1.57079632679489655800e+00; /* 0x3FF921FB, 0x54442D18 */ 21 static volatile double 22 diff --git a/e_acosh.cpp b/e_acosh.cpp 23 --- a/e_acosh.cpp 24 +++ b/e_acosh.cpp 25 @@ -25,16 +25,17 @@ 26 * acosh(x) := log1p(t+sqrt(2.0*t+t*t)); where t=x-1. 27 * 28 * Special cases: 29 * acosh(x) is NaN with signal if x<1. 30 * acosh(NaN) is NaN without signal. 31 */ 32 33 #include <float.h> 34 +#include <math.h> 35 36 #include "math_private.h" 37 38 static const double 39 one = 1.0, 40 ln2 = 6.93147180559945286227e-01; /* 0x3FE62E42, 0xFEFA39EF */ 41 42 double 43 diff --git a/e_asin.cpp b/e_asin.cpp 44 --- a/e_asin.cpp 45 +++ b/e_asin.cpp 46 @@ -40,16 +40,17 @@ 47 * 48 * Special cases: 49 * if x is NaN, return x itself; 50 * if |x|>1, return NaN with invalid signal. 51 * 52 */ 53 54 #include <float.h> 55 +#include <math.h> 56 57 #include "math_private.h" 58 59 static const double 60 one = 1.00000000000000000000e+00, /* 0x3FF00000, 0x00000000 */ 61 huge = 1.000e+300, 62 pio2_hi = 1.57079632679489655800e+00, /* 0x3FF921FB, 0x54442D18 */ 63 pio2_lo = 6.12323399573676603587e-17, /* 0x3C91A626, 0x33145C07 */ 64 diff --git a/e_hypot.cpp b/e_hypot.cpp 65 --- a/e_hypot.cpp 66 +++ b/e_hypot.cpp 67 @@ -42,16 +42,17 @@ 68 * hypot(x,y) is NAN if x or y is NAN. 69 * 70 * Accuracy: 71 * hypot(x,y) returns sqrt(x^2+y^2) with error less 72 * than 1 ulps (units in the last place) 73 */ 74 75 #include <float.h> 76 +#include <math.h> 77 78 #include "math_private.h" 79 80 double 81 __ieee754_hypot(double x, double y) 82 { 83 double a,b,t1,t2,y1,y2,w; 84 int32_t j,k,ha,hb; 85 diff --git a/e_pow.cpp b/e_pow.cpp 86 --- a/e_pow.cpp 87 +++ b/e_pow.cpp 88 @@ -53,16 +53,17 @@ 89 * Constants : 90 * The hexadecimal values are the intended ones for the following 91 * constants. The decimal values may be used, provided that the 92 * compiler will convert from decimal to binary accurately enough 93 * to produce the hexadecimal values shown. 94 */ 95 96 #include <float.h> 97 +#include <math.h> 98 #include "math_private.h" 99 100 static const double 101 bp[] = {1.0, 1.5,}, 102 dp_h[] = { 0.0, 5.84962487220764160156e-01,}, /* 0x3FE2B803, 0x40000000 */ 103 dp_l[] = { 0.0, 1.35003920212974897128e-08,}, /* 0x3E4CFDEB, 0x43CFD006 */ 104 zero = 0.0, 105 half = 0.5, 106 diff --git a/s_asinh.cpp b/s_asinh.cpp 107 --- a/s_asinh.cpp 108 +++ b/s_asinh.cpp 109 @@ -20,16 +20,17 @@ 110 * we have 111 * asinh(x) := x if 1+x*x=1, 112 * := sign(x)*(log(x)+ln2)) for large |x|, else 113 * := sign(x)*log(2|x|+1/(|x|+sqrt(x*x+1))) if|x|>2, else 114 * := sign(x)*log1p(|x| + x^2/(1 + sqrt(1+x^2))) 115 */ 116 117 #include <float.h> 118 +#include <math.h> 119 120 #include "math_private.h" 121 122 static const double 123 one = 1.00000000000000000000e+00, /* 0x3FF00000, 0x00000000 */ 124 ln2 = 6.93147180559945286227e-01, /* 0x3FE62E42, 0xFEFA39EF */ 125 huge= 1.00000000000000000000e+300; 126 127 --- a/e_asinf.cpp 2022-12-13 14:45:17.953154257 -0500 128 +++ b/e_asinf.cpp 2022-12-13 14:45:03.425091710 -0500 129 @@ -11,16 +11,18 @@ 130 * software is freely granted, provided that this notice 131 * is preserved. 132 * ==================================================== 133 */ 134 135 //#include <sys/cdefs.h> 136 //__FBSDID("$FreeBSD$"); 137 138 +#include <math.h> 139 + 140 #include "math_private.h" 141 142 static const float 143 one = 1.0000000000e+00, /* 0x3F800000 */ 144 huge = 1.000e+30, 145 /* coefficient for R(x^2) */ 146 pS0 = 1.6666586697e-01, 147 pS1 = -4.2743422091e-02,