25_use_stdlib_fabs_sqrtf_scalbn_floor.patch (5382B)
1 diff --git a/e_acosf.cpp b/e_acosf.cpp 2 --- a/e_acosf.cpp 3 +++ b/e_acosf.cpp 4 @@ -11,16 +11,18 @@ 5 * software is freely granted, provided that this notice 6 * is preserved. 7 * ==================================================== 8 */ 9 10 //#include <sys/cdefs.h> 11 //__FBSDID("$FreeBSD$"); 12 13 +#include <math.h> 14 + 15 #include "math_private.h" 16 17 static const float 18 one = 1.0000000000e+00, /* 0x3F800000 */ 19 pi = 3.1415925026e+00, /* 0x40490fda */ 20 pio2_hi = 1.5707962513e+00; /* 0x3fc90fda */ 21 static volatile float 22 pio2_lo = 7.5497894159e-08; /* 0x33a22168 */ 23 diff --git a/e_atan2.cpp b/e_atan2.cpp 24 --- a/e_atan2.cpp 25 +++ b/e_atan2.cpp 26 @@ -38,16 +38,17 @@ 27 * Constants: 28 * The hexadecimal values are the intended ones for the following 29 * constants. The decimal values may be used, provided that the 30 * compiler will convert from decimal to binary accurately enough 31 * to produce the hexadecimal values shown. 32 */ 33 34 #include <float.h> 35 +#include <math.h> 36 37 #include "math_private.h" 38 39 static volatile double 40 tiny = 1.0e-300; 41 static const double 42 zero = 0.0, 43 pi_o_4 = 7.8539816339744827900E-01, /* 0x3FE921FB, 0x54442D18 */ 44 diff --git a/e_cosh.cpp b/e_cosh.cpp 45 --- a/e_cosh.cpp 46 +++ b/e_cosh.cpp 47 @@ -31,16 +31,17 @@ 48 * ln2ovft < x : cosh(x) := huge*huge (overflow) 49 * 50 * Special cases: 51 * cosh(x) is |x| if x is +INF, -INF, or NaN. 52 * only cosh(0)=1 is exact for finite x. 53 */ 54 55 #include <float.h> 56 +#include <math.h> 57 58 #include "math_private.h" 59 60 static const double one = 1.0, half=0.5, huge = 1.0e300; 61 62 double 63 __ieee754_cosh(double x) 64 { 65 diff --git a/e_hypotf.cpp b/e_hypotf.cpp 66 --- a/e_hypotf.cpp 67 +++ b/e_hypotf.cpp 68 @@ -11,16 +11,18 @@ 69 * software is freely granted, provided that this notice 70 * is preserved. 71 * ==================================================== 72 */ 73 74 //#include <sys/cdefs.h> 75 //__FBSDID("$FreeBSD$"); 76 77 +#include <math.h> 78 + 79 #include "math.h" 80 #include "math_private.h" 81 82 float 83 __ieee754_hypotf(float x, float y) 84 { 85 float a,b,t1,t2,y1,y2,w; 86 int32_t j,k,ha,hb; 87 88 GET_FLOAT_WORD(ha,x); 89 ha &= 0x7fffffff; 90 diff --git a/e_powf.cpp b/e_powf.cpp 91 --- a/e_powf.cpp 92 +++ b/e_powf.cpp 93 @@ -11,16 +11,18 @@ 94 * software is freely granted, provided that this notice 95 * is preserved. 96 * ==================================================== 97 */ 98 99 //#include <sys/cdefs.h> 100 //__FBSDID("$FreeBSD$"); 101 102 +#include <math.h> 103 + 104 #include "math_private.h" 105 106 static const float 107 bp[] = {1.0, 1.5,}, 108 dp_h[] = { 0.0, 5.84960938e-01,}, /* 0x3f15c000 */ 109 dp_l[] = { 0.0, 1.56322085e-06,}, /* 0x35d1cfdc */ 110 zero = 0.0, 111 half = 0.5, 112 diff --git a/e_sinh.cpp b/e_sinh.cpp 113 --- a/e_sinh.cpp 114 +++ b/e_sinh.cpp 115 @@ -28,16 +28,17 @@ 116 * ln2ovft < x : sinh(x) := x*shuge (overflow) 117 * 118 * Special cases: 119 * sinh(x) is |x| if x is +INF, -INF, or NaN. 120 * only sinh(0)=0 is exact for finite x. 121 */ 122 123 #include <float.h> 124 +#include <math.h> 125 126 #include "math_private.h" 127 128 static const double one = 1.0, shuge = 1.0e307; 129 130 double 131 __ieee754_sinh(double x) 132 { 133 diff --git a/k_rem_pio2.cpp b/k_rem_pio2.cpp 134 --- a/k_rem_pio2.cpp 135 +++ b/k_rem_pio2.cpp 136 @@ -125,16 +125,17 @@ 137 * Constants: 138 * The hexadecimal values are the intended ones for the following 139 * constants. The decimal values may be used, provided that the 140 * compiler will convert from decimal to binary accurately enough 141 * to produce the hexadecimal values shown. 142 */ 143 144 #include <float.h> 145 +#include <math.h> 146 147 #include "math_private.h" 148 149 static const int init_jk[] = {3,4,4,6}; /* initial value for jk */ 150 151 /* 152 * Table of constants for 2/pi, 396 Hex digits (476 decimal) of 2/pi 153 * 154 diff --git a/s_atan.cpp b/s_atan.cpp 155 --- a/s_atan.cpp 156 +++ b/s_atan.cpp 157 @@ -29,16 +29,17 @@ 158 * Constants: 159 * The hexadecimal values are the intended ones for the following 160 * constants. The decimal values may be used, provided that the 161 * compiler will convert from decimal to binary accurately enough 162 * to produce the hexadecimal values shown. 163 */ 164 165 #include <float.h> 166 +#include <math.h> 167 168 #include "math_private.h" 169 170 static const double atanhi[] = { 171 4.63647609000806093515e-01, /* atan(0.5)hi 0x3FDDAC67, 0x0561BB4F */ 172 7.85398163397448278999e-01, /* atan(1.0)hi 0x3FE921FB, 0x54442D18 */ 173 9.82793723247329054082e-01, /* atan(1.5)hi 0x3FEF730B, 0xD281F69B */ 174 1.57079632679489655800e+00, /* atan(inf)hi 0x3FF921FB, 0x54442D18 */ 175 diff --git a/s_atanf.cpp b/s_atanf.cpp 176 --- a/s_atanf.cpp 177 +++ b/s_atanf.cpp 178 @@ -11,16 +11,18 @@ 179 * software is freely granted, provided that this notice 180 * is preserved. 181 * ==================================================== 182 */ 183 184 //#include <sys/cdefs.h> 185 //__FBSDID("$FreeBSD$"); 186 187 +#include <math.h> 188 + 189 #include "math_private.h" 190 191 static const float atanhi[] = { 192 4.6364760399e-01, /* atan(0.5)hi 0x3eed6338 */ 193 7.8539812565e-01, /* atan(1.0)hi 0x3f490fda */ 194 9.8279368877e-01, /* atan(1.5)hi 0x3f7b985e */ 195 1.5707962513e+00, /* atan(inf)hi 0x3fc90fda */ 196 }; 197 diff --git a/s_tanh.cpp b/s_tanh.cpp 198 --- a/s_tanh.cpp 199 +++ b/s_tanh.cpp 200 @@ -33,16 +33,17 @@ 201 * 22 <= x <= INF : tanh(x) := 1. 202 * 203 * Special cases: 204 * tanh(NaN) is NaN; 205 * only tanh(0)=0 is exact for finite argument. 206 */ 207 208 #include <float.h> 209 +#include <math.h> 210 211 #include "math_private.h" 212 213 static const volatile double tiny = 1.0e-300; 214 static const double one = 1.0, two = 2.0, huge = 1.0e300; 215 216 double 217 tanh(double x)