04_include_fdlibm_h_from_math_private_h.patch (24187B)
1 "math.h" is still included in e_hypotf.cpp for fabsl() and 2 in e_log10f.cpp for float_t. 3 diff --git a/e_acos.cpp b/e_acos.cpp 4 --- a/e_acos.cpp 5 +++ b/e_acos.cpp 6 @@ -35,17 +35,16 @@ __FBSDID("$FreeBSD$"); 7 * if x is NaN, return x itself; 8 * if |x|>1, return NaN with invalid signal. 9 * 10 * Function needed: sqrt 11 */ 12 13 #include <float.h> 14 15 -#include "math.h" 16 #include "math_private.h" 17 18 static const double 19 one= 1.00000000000000000000e+00, /* 0x3FF00000, 0x00000000 */ 20 pi = 3.14159265358979311600e+00, /* 0x400921FB, 0x54442D18 */ 21 pio2_hi = 1.57079632679489655800e+00; /* 0x3FF921FB, 0x54442D18 */ 22 static volatile double 23 pio2_lo = 6.12323399573676603587e-17; /* 0x3C91A626, 0x33145C07 */ 24 diff --git a/e_acosh.cpp b/e_acosh.cpp 25 --- a/e_acosh.cpp 26 +++ b/e_acosh.cpp 27 @@ -26,17 +26,16 @@ __FBSDID("$FreeBSD$"); 28 * 29 * Special cases: 30 * acosh(x) is NaN with signal if x<1. 31 * acosh(NaN) is NaN without signal. 32 */ 33 34 #include <float.h> 35 36 -#include "math.h" 37 #include "math_private.h" 38 39 static const double 40 one = 1.0, 41 ln2 = 6.93147180559945286227e-01; /* 0x3FE62E42, 0xFEFA39EF */ 42 43 double 44 __ieee754_acosh(double x) 45 diff --git a/e_asin.cpp b/e_asin.cpp 46 --- a/e_asin.cpp 47 +++ b/e_asin.cpp 48 @@ -41,17 +41,16 @@ __FBSDID("$FreeBSD$"); 49 * Special cases: 50 * if x is NaN, return x itself; 51 * if |x|>1, return NaN with invalid signal. 52 * 53 */ 54 55 #include <float.h> 56 57 -#include "math.h" 58 #include "math_private.h" 59 60 static const double 61 one = 1.00000000000000000000e+00, /* 0x3FF00000, 0x00000000 */ 62 huge = 1.000e+300, 63 pio2_hi = 1.57079632679489655800e+00, /* 0x3FF921FB, 0x54442D18 */ 64 pio2_lo = 6.12323399573676603587e-17, /* 0x3C91A626, 0x33145C07 */ 65 pio4_hi = 7.85398163397448278999e-01, /* 0x3FE921FB, 0x54442D18 */ 66 diff --git a/e_atan2.cpp b/e_atan2.cpp 67 --- a/e_atan2.cpp 68 +++ b/e_atan2.cpp 69 @@ -39,17 +39,16 @@ __FBSDID("$FreeBSD$"); 70 * The hexadecimal values are the intended ones for the following 71 * constants. The decimal values may be used, provided that the 72 * compiler will convert from decimal to binary accurately enough 73 * to produce the hexadecimal values shown. 74 */ 75 76 #include <float.h> 77 78 -#include "math.h" 79 #include "math_private.h" 80 81 static volatile double 82 tiny = 1.0e-300; 83 static const double 84 zero = 0.0, 85 pi_o_4 = 7.8539816339744827900E-01, /* 0x3FE921FB, 0x54442D18 */ 86 pi_o_2 = 1.5707963267948965580E+00, /* 0x3FF921FB, 0x54442D18 */ 87 diff --git a/e_atanh.cpp b/e_atanh.cpp 88 --- a/e_atanh.cpp 89 +++ b/e_atanh.cpp 90 @@ -30,17 +30,16 @@ __FBSDID("$FreeBSD$"); 91 * atanh(x) is NaN if |x| > 1 with signal; 92 * atanh(NaN) is that NaN with no signal; 93 * atanh(+-1) is +-INF with signal. 94 * 95 */ 96 97 #include <float.h> 98 99 -#include "math.h" 100 #include "math_private.h" 101 102 static const double one = 1.0, huge = 1e300; 103 static const double zero = 0.0; 104 105 double 106 __ieee754_atanh(double x) 107 { 108 diff --git a/e_cosh.cpp b/e_cosh.cpp 109 --- a/e_cosh.cpp 110 +++ b/e_cosh.cpp 111 @@ -32,17 +32,16 @@ __FBSDID("$FreeBSD$"); 112 * 113 * Special cases: 114 * cosh(x) is |x| if x is +INF, -INF, or NaN. 115 * only cosh(0)=1 is exact for finite x. 116 */ 117 118 #include <float.h> 119 120 -#include "math.h" 121 #include "math_private.h" 122 123 static const double one = 1.0, half=0.5, huge = 1.0e300; 124 125 double 126 __ieee754_cosh(double x) 127 { 128 double t,w; 129 diff --git a/e_exp.cpp b/e_exp.cpp 130 --- a/e_exp.cpp 131 +++ b/e_exp.cpp 132 @@ -73,17 +73,16 @@ __FBSDID("$FreeBSD$"); 133 * The hexadecimal values are the intended ones for the following 134 * constants. The decimal values may be used, provided that the 135 * compiler will convert from decimal to binary accurately enough 136 * to produce the hexadecimal values shown. 137 */ 138 139 #include <float.h> 140 141 -#include "math.h" 142 #include "math_private.h" 143 144 static const double 145 one = 1.0, 146 halF[2] = {0.5,-0.5,}, 147 o_threshold= 7.09782712893383973096e+02, /* 0x40862E42, 0xFEFA39EF */ 148 u_threshold= -7.45133219101941108420e+02, /* 0xc0874910, 0xD52D3051 */ 149 ln2HI[2] ={ 6.93147180369123816490e-01, /* 0x3fe62e42, 0xfee00000 */ 150 diff --git a/e_hypot.cpp b/e_hypot.cpp 151 --- a/e_hypot.cpp 152 +++ b/e_hypot.cpp 153 @@ -43,17 +43,16 @@ __FBSDID("$FreeBSD$"); 154 * 155 * Accuracy: 156 * hypot(x,y) returns sqrt(x^2+y^2) with error less 157 * than 1 ulps (units in the last place) 158 */ 159 160 #include <float.h> 161 162 -#include "math.h" 163 #include "math_private.h" 164 165 double 166 __ieee754_hypot(double x, double y) 167 { 168 double a,b,t1,t2,y1,y2,w; 169 int32_t j,k,ha,hb; 170 171 diff --git a/e_log.cpp b/e_log.cpp 172 --- a/e_log.cpp 173 +++ b/e_log.cpp 174 @@ -62,17 +62,16 @@ __FBSDID("$FreeBSD$"); 175 * The hexadecimal values are the intended ones for the following 176 * constants. The decimal values may be used, provided that the 177 * compiler will convert from decimal to binary accurately enough 178 * to produce the hexadecimal values shown. 179 */ 180 181 #include <float.h> 182 183 -#include "math.h" 184 #include "math_private.h" 185 186 static const double 187 ln2_hi = 6.93147180369123816490e-01, /* 3fe62e42 fee00000 */ 188 ln2_lo = 1.90821492927058770002e-10, /* 3dea39ef 35793c76 */ 189 two54 = 1.80143985094819840000e+16, /* 43500000 00000000 */ 190 Lg1 = 6.666666666666735130e-01, /* 3FE55555 55555593 */ 191 Lg2 = 3.999999999940941908e-01, /* 3FD99999 9997FA04 */ 192 diff --git a/e_log10.cpp b/e_log10.cpp 193 --- a/e_log10.cpp 194 +++ b/e_log10.cpp 195 @@ -19,17 +19,16 @@ __FBSDID("$FreeBSD$"); 196 * comments. 197 * 198 * log10(x) = (f - 0.5*f*f + k_log1p(f)) / ln10 + k * log10(2) 199 * in not-quite-routine extra precision. 200 */ 201 202 #include <float.h> 203 204 -#include "math.h" 205 #include "math_private.h" 206 #include "k_log.h" 207 208 static const double 209 two54 = 1.80143985094819840000e+16, /* 0x43500000, 0x00000000 */ 210 ivln10hi = 4.34294481878168880939e-01, /* 0x3fdbcb7b, 0x15200000 */ 211 ivln10lo = 2.50829467116452752298e-11, /* 0x3dbb9438, 0xca9aadd5 */ 212 log10_2hi = 3.01029995663611771306e-01, /* 0x3FD34413, 0x509F6000 */ 213 diff --git a/e_log2.cpp b/e_log2.cpp 214 --- a/e_log2.cpp 215 +++ b/e_log2.cpp 216 @@ -21,17 +21,16 @@ __FBSDID("$FreeBSD$"); 217 * This reduces x to {k, 1+f} exactly as in e_log.c, then calls the kernel, 218 * then does the combining and scaling steps 219 * log2(x) = (f - 0.5*f*f + k_log1p(f)) / ln2 + k 220 * in not-quite-routine extra precision. 221 */ 222 223 #include <float.h> 224 225 -#include "math.h" 226 #include "math_private.h" 227 #include "k_log.h" 228 229 static const double 230 two54 = 1.80143985094819840000e+16, /* 0x43500000, 0x00000000 */ 231 ivln2hi = 1.44269504072144627571e+00, /* 0x3ff71547, 0x65200000 */ 232 ivln2lo = 1.67517131648865118353e-10; /* 0x3de705fc, 0x2eefa200 */ 233 234 diff --git a/e_pow.cpp b/e_pow.cpp 235 --- a/e_pow.cpp 236 +++ b/e_pow.cpp 237 @@ -53,17 +53,16 @@ __FBSDID("$FreeBSD$"); 238 * Constants : 239 * The hexadecimal values are the intended ones for the following 240 * constants. The decimal values may be used, provided that the 241 * compiler will convert from decimal to binary accurately enough 242 * to produce the hexadecimal values shown. 243 */ 244 245 #include <float.h> 246 -#include "math.h" 247 #include "math_private.h" 248 249 static const double 250 bp[] = {1.0, 1.5,}, 251 dp_h[] = { 0.0, 5.84962487220764160156e-01,}, /* 0x3FE2B803, 0x40000000 */ 252 dp_l[] = { 0.0, 1.35003920212974897128e-08,}, /* 0x3E4CFDEB, 0x43CFD006 */ 253 zero = 0.0, 254 half = 0.5, 255 diff --git a/e_rem_pio2.cpp b/e_rem_pio2.cpp 256 --- a/e_rem_pio2.cpp 257 +++ b/e_rem_pio2.cpp 258 @@ -19,17 +19,16 @@ __FBSDID("$FreeBSD$"); 259 /* __ieee754_rem_pio2(x,y) 260 * 261 * return the remainder of x rem pi/2 in y[0]+y[1] 262 * use __kernel_rem_pio2() 263 */ 264 265 #include <float.h> 266 267 -#include "math.h" 268 #include "math_private.h" 269 270 /* 271 * invpio2: 53 bits of 2/pi 272 * pio2_1: first 33 bit of pi/2 273 * pio2_1t: pi/2 - pio2_1 274 * pio2_2: second 33 bit of pi/2 275 * pio2_2t: pi/2 - (pio2_1+pio2_2) 276 diff --git a/e_sinh.cpp b/e_sinh.cpp 277 --- a/e_sinh.cpp 278 +++ b/e_sinh.cpp 279 @@ -29,17 +29,16 @@ __FBSDID("$FreeBSD$"); 280 * 281 * Special cases: 282 * sinh(x) is |x| if x is +INF, -INF, or NaN. 283 * only sinh(0)=0 is exact for finite x. 284 */ 285 286 #include <float.h> 287 288 -#include "math.h" 289 #include "math_private.h" 290 291 static const double one = 1.0, shuge = 1.0e307; 292 293 double 294 __ieee754_sinh(double x) 295 { 296 double t,h; 297 diff --git a/k_cos.cpp b/k_cos.cpp 298 --- a/k_cos.cpp 299 +++ b/k_cos.cpp 300 @@ -48,17 +48,16 @@ __FBSDID("$FreeBSD$"); 301 * and tmp having the same precision as x. If they have extra 302 * precision due to compiler bugs, then the extra precision is 303 * only good provided it is retained in all terms of the final 304 * expression for cos(). Retention happens in all cases tested 305 * under FreeBSD, so don't pessimize things by forcibly clipping 306 * any extra precision in w. 307 */ 308 309 -#include "math.h" 310 #include "math_private.h" 311 312 static const double 313 one = 1.00000000000000000000e+00, /* 0x3FF00000, 0x00000000 */ 314 C1 = 4.16666666666666019037e-02, /* 0x3FA55555, 0x5555554C */ 315 C2 = -1.38888888888741095749e-03, /* 0xBF56C16C, 0x16C15177 */ 316 C3 = 2.48015872894767294178e-05, /* 0x3EFA01A0, 0x19CB1590 */ 317 C4 = -2.75573143513906633035e-07, /* 0xBE927E4F, 0x809C52AD */ 318 diff --git a/k_exp.cpp b/k_exp.cpp 319 --- a/k_exp.cpp 320 +++ b/k_exp.cpp 321 @@ -26,17 +26,16 @@ 322 * SUCH DAMAGE. 323 */ 324 325 #include <sys/cdefs.h> 326 __FBSDID("$FreeBSD$"); 327 328 #include <complex.h> 329 330 -#include "math.h" 331 #include "math_private.h" 332 333 static const uint32_t k = 1799; /* constant for reduction */ 334 static const double kln2 = 1246.97177782734161156; /* k * ln2 */ 335 336 /* 337 * Compute exp(x), scaled to avoid spurious overflow. An exponent is 338 * returned separately in 'expt'. 339 diff --git a/k_rem_pio2.cpp b/k_rem_pio2.cpp 340 --- a/k_rem_pio2.cpp 341 +++ b/k_rem_pio2.cpp 342 @@ -126,17 +126,16 @@ __FBSDID("$FreeBSD$"); 343 * The hexadecimal values are the intended ones for the following 344 * constants. The decimal values may be used, provided that the 345 * compiler will convert from decimal to binary accurately enough 346 * to produce the hexadecimal values shown. 347 */ 348 349 #include <float.h> 350 351 -#include "math.h" 352 #include "math_private.h" 353 354 static const int init_jk[] = {3,4,4,6}; /* initial value for jk */ 355 356 /* 357 * Table of constants for 2/pi, 396 Hex digits (476 decimal) of 2/pi 358 * 359 * integer array, contains the (24*i)-th to (24*i+23)-th 360 diff --git a/k_sin.cpp b/k_sin.cpp 361 --- a/k_sin.cpp 362 +++ b/k_sin.cpp 363 @@ -39,17 +39,16 @@ __FBSDID("$FreeBSD$"); 364 * ~ sin(x) + (1-x*x/2)*y 365 * For better accuracy, let 366 * 3 2 2 2 2 367 * r = x *(S2+x *(S3+x *(S4+x *(S5+x *S6)))) 368 * then 3 2 369 * sin(x) = x + (S1*x + (x *(r-y/2)+y)) 370 */ 371 372 -#include "math.h" 373 #include "math_private.h" 374 375 static const double 376 half = 5.00000000000000000000e-01, /* 0x3FE00000, 0x00000000 */ 377 S1 = -1.66666666666666324348e-01, /* 0xBFC55555, 0x55555549 */ 378 S2 = 8.33333333332248946124e-03, /* 0x3F811111, 0x1110F8A6 */ 379 S3 = -1.98412698298579493134e-04, /* 0xBF2A01A0, 0x19C161D5 */ 380 S4 = 2.75573137070700676789e-06, /* 0x3EC71DE3, 0x57B1FE7D */ 381 diff --git a/k_tan.cpp b/k_tan.cpp 382 --- a/k_tan.cpp 383 +++ b/k_tan.cpp 384 @@ -44,17 +44,16 @@ __FBSDID("$FreeBSD$"); 385 * 3 2 386 * tan(x+y) = x + (T1*x + (x *(r+y)+y)) 387 * 388 * 4. For x in [0.67434,pi/4], let y = pi/4 - x, then 389 * tan(x) = tan(pi/4-y) = (1-tan(y))/(1+tan(y)) 390 * = 1 - 2*(tan(y) - (tan(y)^2)/(1+tan(y))) 391 */ 392 393 -#include "math.h" 394 #include "math_private.h" 395 static const double xxx[] = { 396 3.33333333333334091986e-01, /* 3FD55555, 55555563 */ 397 1.33333333333201242699e-01, /* 3FC11111, 1110FE7A */ 398 5.39682539762260521377e-02, /* 3FABA1BA, 1BB341FE */ 399 2.18694882948595424599e-02, /* 3F9664F4, 8406D637 */ 400 8.86323982359930005737e-03, /* 3F8226E3, E96E8493 */ 401 3.59207910759131235356e-03, /* 3F6D6D22, C9560328 */ 402 diff --git a/math_private.h b/math_private.h 403 --- a/math_private.h 404 +++ b/math_private.h 405 @@ -15,16 +15,18 @@ 406 */ 407 408 #ifndef _MATH_PRIVATE_H_ 409 #define _MATH_PRIVATE_H_ 410 411 #include <sys/types.h> 412 #include <machine/endian.h> 413 414 +#include "fdlibm.h" 415 + 416 /* 417 * The original fdlibm code used statements like: 418 * n0 = ((*(int*)&one)>>29)^1; * index of high word * 419 * ix0 = *(n0+(int*)&x); * high word of x * 420 * ix1 = *((1-n0)+(int*)&x); * low word of x * 421 * to dig two 32 bit words out of the 64 bit IEEE floating point 422 * value. That is non-ANSI, and, moreover, the gcc instruction 423 * scheduler gets it wrong. We instead use the following macros. 424 diff --git a/s_asinh.cpp b/s_asinh.cpp 425 --- a/s_asinh.cpp 426 +++ b/s_asinh.cpp 427 @@ -21,17 +21,16 @@ __FBSDID("$FreeBSD$"); 428 * asinh(x) := x if 1+x*x=1, 429 * := sign(x)*(log(x)+ln2)) for large |x|, else 430 * := sign(x)*log(2|x|+1/(|x|+sqrt(x*x+1))) if|x|>2, else 431 * := sign(x)*log1p(|x| + x^2/(1 + sqrt(1+x^2))) 432 */ 433 434 #include <float.h> 435 436 -#include "math.h" 437 #include "math_private.h" 438 439 static const double 440 one = 1.00000000000000000000e+00, /* 0x3FF00000, 0x00000000 */ 441 ln2 = 6.93147180559945286227e-01, /* 0x3FE62E42, 0xFEFA39EF */ 442 huge= 1.00000000000000000000e+300; 443 444 double 445 diff --git a/s_atan.cpp b/s_atan.cpp 446 --- a/s_atan.cpp 447 +++ b/s_atan.cpp 448 @@ -30,17 +30,16 @@ __FBSDID("$FreeBSD$"); 449 * The hexadecimal values are the intended ones for the following 450 * constants. The decimal values may be used, provided that the 451 * compiler will convert from decimal to binary accurately enough 452 * to produce the hexadecimal values shown. 453 */ 454 455 #include <float.h> 456 457 -#include "math.h" 458 #include "math_private.h" 459 460 static const double atanhi[] = { 461 4.63647609000806093515e-01, /* atan(0.5)hi 0x3FDDAC67, 0x0561BB4F */ 462 7.85398163397448278999e-01, /* atan(1.0)hi 0x3FE921FB, 0x54442D18 */ 463 9.82793723247329054082e-01, /* atan(1.5)hi 0x3FEF730B, 0xD281F69B */ 464 1.57079632679489655800e+00, /* atan(inf)hi 0x3FF921FB, 0x54442D18 */ 465 }; 466 diff --git a/s_cbrt.cpp b/s_cbrt.cpp 467 --- a/s_cbrt.cpp 468 +++ b/s_cbrt.cpp 469 @@ -11,17 +11,16 @@ 470 * 471 * Optimized by Bruce D. Evans. 472 */ 473 474 #include <sys/cdefs.h> 475 __FBSDID("$FreeBSD$"); 476 477 #include <float.h> 478 -#include "math.h" 479 #include "math_private.h" 480 481 /* cbrt(x) 482 * Return cube root of x 483 */ 484 static const u_int32_t 485 B1 = 715094163, /* B1 = (1023-1023/3-0.03306235651)*2**20 */ 486 B2 = 696219795; /* B2 = (1023-1023/3-54/3-0.03306235651)*2**20 */ 487 diff --git a/s_cos.cpp b/s_cos.cpp 488 --- a/s_cos.cpp 489 +++ b/s_cos.cpp 490 @@ -41,17 +41,16 @@ __FBSDID("$FreeBSD$"); 491 * trig(NaN) is that NaN; 492 * 493 * Accuracy: 494 * TRIG(x) returns trig(x) nearly rounded 495 */ 496 497 #include <float.h> 498 499 -#include "math.h" 500 #define INLINE_REM_PIO2 501 #include "math_private.h" 502 #include "e_rem_pio2.c" 503 504 double 505 cos(double x) 506 { 507 double y[2],z=0.0; 508 diff --git a/s_expm1.cpp b/s_expm1.cpp 509 --- a/s_expm1.cpp 510 +++ b/s_expm1.cpp 511 @@ -105,17 +105,16 @@ __FBSDID("$FreeBSD$"); 512 * The hexadecimal values are the intended ones for the following 513 * constants. The decimal values may be used, provided that the 514 * compiler will convert from decimal to binary accurately enough 515 * to produce the hexadecimal values shown. 516 */ 517 518 #include <float.h> 519 520 -#include "math.h" 521 #include "math_private.h" 522 523 static const double 524 one = 1.0, 525 tiny = 1.0e-300, 526 o_threshold = 7.09782712893383973096e+02,/* 0x40862E42, 0xFEFA39EF */ 527 ln2_hi = 6.93147180369123816490e-01,/* 0x3fe62e42, 0xfee00000 */ 528 ln2_lo = 1.90821492927058770002e-10,/* 0x3dea39ef, 0x35793c76 */ 529 diff --git a/s_log1p.cpp b/s_log1p.cpp 530 --- a/s_log1p.cpp 531 +++ b/s_log1p.cpp 532 @@ -75,17 +75,16 @@ __FBSDID("$FreeBSD$"); 533 * if(u==1.0) return x ; else 534 * return log(u)*(x/(u-1.0)); 535 * 536 * See HP-15C Advanced Functions Handbook, p.193. 537 */ 538 539 #include <float.h> 540 541 -#include "math.h" 542 #include "math_private.h" 543 544 static const double 545 ln2_hi = 6.93147180369123816490e-01, /* 3fe62e42 fee00000 */ 546 ln2_lo = 1.90821492927058770002e-10, /* 3dea39ef 35793c76 */ 547 two54 = 1.80143985094819840000e+16, /* 43500000 00000000 */ 548 Lp1 = 6.666666666666735130e-01, /* 3FE55555 55555593 */ 549 Lp2 = 3.999999999940941908e-01, /* 3FD99999 9997FA04 */ 550 diff --git a/s_sin.cpp b/s_sin.cpp 551 --- a/s_sin.cpp 552 +++ b/s_sin.cpp 553 @@ -41,17 +41,16 @@ __FBSDID("$FreeBSD$"); 554 * trig(NaN) is that NaN; 555 * 556 * Accuracy: 557 * TRIG(x) returns trig(x) nearly rounded 558 */ 559 560 #include <float.h> 561 562 -#include "math.h" 563 #define INLINE_REM_PIO2 564 #include "math_private.h" 565 #include "e_rem_pio2.c" 566 567 double 568 sin(double x) 569 { 570 double y[2],z=0.0; 571 diff --git a/s_tan.cpp b/s_tan.cpp 572 --- a/s_tan.cpp 573 +++ b/s_tan.cpp 574 @@ -40,17 +40,16 @@ __FBSDID("$FreeBSD$"); 575 * trig(NaN) is that NaN; 576 * 577 * Accuracy: 578 * TRIG(x) returns trig(x) nearly rounded 579 */ 580 581 #include <float.h> 582 583 -#include "math.h" 584 #define INLINE_REM_PIO2 585 #include "math_private.h" 586 #include "e_rem_pio2.c" 587 588 double 589 tan(double x) 590 { 591 double y[2],z=0.0; 592 diff --git a/s_tanh.cpp b/s_tanh.cpp 593 --- a/s_tanh.cpp 594 +++ b/s_tanh.cpp 595 @@ -34,17 +34,16 @@ __FBSDID("$FreeBSD$"); 596 * 597 * Special cases: 598 * tanh(NaN) is NaN; 599 * only tanh(0)=0 is exact for finite argument. 600 */ 601 602 #include <float.h> 603 604 -#include "math.h" 605 #include "math_private.h" 606 607 static const volatile double tiny = 1.0e-300; 608 static const double one = 1.0, two = 2.0, huge = 1.0e300; 609 610 double 611 tanh(double x) 612 { 613 --- a/e_acosf.cpp 2022-12-11 21:15:50.058431053 -0500 614 +++ b/e_acosf.cpp_new 2022-12-11 21:13:10.532515637 -0500 615 @@ -12,15 +12,14 @@ 616 * is preserved. 617 * ==================================================== 618 */ 619 620 #include <sys/cdefs.h> 621 __FBSDID("$FreeBSD$"); 622 623 -#include "math.h" 624 #include "math_private.h" 625 626 static const float 627 one = 1.0000000000e+00, /* 0x3F800000 */ 628 pi = 3.1415925026e+00, /* 0x40490fda */ 629 pio2_hi = 1.5707962513e+00; /* 0x3fc90fda */ 630 static volatile float 631 --- a/e_asinf.cpp 2022-12-11 21:15:50.486437124 -0500 632 +++ b/e_asinf.cpp_new 2022-12-11 21:13:07.876498396 -0500 633 @@ -12,15 +12,14 @@ 634 * is preserved. 635 * ==================================================== 636 */ 637 638 #include <sys/cdefs.h> 639 __FBSDID("$FreeBSD$"); 640 641 -#include "math.h" 642 #include "math_private.h" 643 644 static const float 645 one = 1.0000000000e+00, /* 0x3F800000 */ 646 huge = 1.000e+30, 647 /* coefficient for R(x^2) */ 648 pS0 = 1.6666586697e-01, 649 --- a/e_expf.cpp 2022-12-11 21:15:51.250447960 -0500 650 +++ b/e_expf.cpp_new 2022-12-11 21:13:05.212481099 -0500 651 @@ -14,15 +14,14 @@ 652 */ 653 654 #include <sys/cdefs.h> 655 __FBSDID("$FreeBSD$"); 656 657 #include <float.h> 658 659 -#include "math.h" 660 #include "math_private.h" 661 662 static const float 663 one = 1.0, 664 halF[2] = {0.5,-0.5,}, 665 o_threshold= 8.8721679688e+01, /* 0x42b17180 */ 666 u_threshold= -1.0397208405e+02, /* 0xc2cff1b5 */ 667 --- a/e_logf.cpp 2022-12-11 21:15:51.978458278 -0500 668 +++ b/e_logf.cpp_new 2022-12-11 21:13:02.644464418 -0500 669 @@ -12,15 +12,14 @@ 670 * is preserved. 671 * ==================================================== 672 */ 673 674 #include <sys/cdefs.h> 675 __FBSDID("$FreeBSD$"); 676 677 -#include "math.h" 678 #include "math_private.h" 679 680 static const float 681 ln2_hi = 6.9313812256e-01, /* 0x3f317180 */ 682 ln2_lo = 9.0580006145e-06, /* 0x3717f7d1 */ 683 two25 = 3.355443200e+07, /* 0x4c000000 */ 684 /* |(log(1+s)-log(1-s))/s - Lg(s)| < 2**-34.24 (~[-4.95e-11, 4.97e-11]). */ 685 --- a/e_powf.cpp 2022-12-11 21:15:52.242462016 -0500 686 +++ b/e_powf.cpp_new 2022-12-11 21:13:00.164448306 -0500 687 @@ -12,15 +12,14 @@ 688 * is preserved. 689 * ==================================================== 690 */ 691 692 #include <sys/cdefs.h> 693 __FBSDID("$FreeBSD$"); 694 695 -#include "math.h" 696 #include "math_private.h" 697 698 static const float 699 bp[] = {1.0, 1.5,}, 700 dp_h[] = { 0.0, 5.84960938e-01,}, /* 0x3f15c000 */ 701 dp_l[] = { 0.0, 1.56322085e-06,}, /* 0x35d1cfdc */ 702 zero = 0.0, 703 --- a/e_rem_pio2f.cpp 2022-12-11 21:15:52.626467454 -0500 704 +++ b/e_rem_pio2f.cpp_new 2022-12-11 21:12:57.300429693 -0500 705 @@ -22,15 +22,14 @@ 706 * return the remainder of x rem pi/2 in *y 707 * use double precision for everything except passing x 708 * use __kernel_rem_pio2() for large x 709 */ 710 711 #include <float.h> 712 713 -#include "math.h" 714 #include "math_private.h" 715 716 /* 717 * invpio2: 53 bits of 2/pi 718 * pio2_1: first 25 bits of pi/2 719 * pio2_1t: pi/2 - pio2_1 720 */ 721 --- a/k_cosf.cpp 2022-12-11 21:15:53.178475268 -0500 722 +++ b/k_cosf.cpp_new 2022-12-11 21:12:52.012395309 -0500 723 @@ -15,15 +15,14 @@ 724 */ 725 726 #ifndef INLINE_KERNEL_COSDF 727 #include <sys/cdefs.h> 728 __FBSDID("$FreeBSD$"); 729 #endif 730 731 -#include "math.h" 732 #include "math_private.h" 733 734 /* |cos(x) - c(x)| < 2**-34.1 (~[-5.37e-11, 5.295e-11]). */ 735 static const double 736 one = 1.0, 737 C0 = -0x1ffffffd0c5e81.0p-54, /* -0.499999997251031003120 */ 738 C1 = 0x155553e1053a42.0p-57, /* 0.0416666233237390631894 */ 739 --- a/k_expf.cpp 2022-12-11 21:15:53.434478888 -0500 740 +++ b/k_expf.cpp_new 2022-12-11 21:12:49.012375792 -0500 741 @@ -27,15 +27,14 @@ 742 */ 743 744 #include <sys/cdefs.h> 745 __FBSDID("$FreeBSD$"); 746 747 #include <complex.h> 748 749 -#include "math.h" 750 #include "math_private.h" 751 752 static const uint32_t k = 235; /* constant for reduction */ 753 static const float kln2 = 162.88958740F; /* k * ln2 */ 754 755 /* 756 * See k_exp.c for details. 757 --- a/k_sinf.cpp 2022-12-11 21:15:53.946486130 -0500 758 +++ b/k_sinf.cpp_new 2022-12-11 21:12:46.020356322 -0500 759 @@ -15,15 +15,14 @@ 760 */ 761 762 #ifndef INLINE_KERNEL_SINDF 763 #include <sys/cdefs.h> 764 __FBSDID("$FreeBSD$"); 765 #endif 766 767 -#include "math.h" 768 #include "math_private.h" 769 770 /* |sin(x)/x - s(x)| < 2**-37.5 (~[-4.89e-12, 4.824e-12]). */ 771 static const double 772 S1 = -0x15555554cbac77.0p-55, /* -0.166666666416265235595 */ 773 S2 = 0x111110896efbb2.0p-59, /* 0.0083333293858894631756 */ 774 S3 = -0x1a00f9e2cae774.0p-65, /* -0.000198393348360966317347 */ 775 --- a/k_tanf.cpp 2022-12-11 21:15:54.254490484 -0500 776 +++ b/k_tanf.cpp_new 2022-12-11 21:12:42.972336479 -0500 777 @@ -14,15 +14,14 @@ 778 */ 779 780 #ifndef INLINE_KERNEL_TANDF 781 #include <sys/cdefs.h> 782 __FBSDID("$FreeBSD$"); 783 #endif 784 785 -#include "math.h" 786 #include "math_private.h" 787 788 /* |tan(x)/x - t(x)| < 2**-25.5 (~[-2e-08, 2e-08]). */ 789 static const double 790 T[] = { 791 0x15554d3418c99f.0p-54, /* 0.333331395030791399758 */ 792 0x1112fd38999f72.0p-55, /* 0.133392002712976742718 */ 793 --- a/s_atanf.cpp 2022-12-11 21:15:54.670496364 -0500 794 +++ b/s_atanf.cpp_new 2022-12-11 21:12:39.940316733 -0500 795 @@ -12,15 +12,14 @@ 796 * is preserved. 797 * ==================================================== 798 */ 799 800 #include <sys/cdefs.h> 801 __FBSDID("$FreeBSD$"); 802 803 -#include "math.h" 804 #include "math_private.h" 805 806 static const float atanhi[] = { 807 4.6364760399e-01, /* atan(0.5)hi 0x3eed6338 */ 808 7.8539812565e-01, /* atan(1.0)hi 0x3f490fda */ 809 9.8279368877e-01, /* atan(1.5)hi 0x3f7b985e */ 810 1.5707962513e+00, /* atan(inf)hi 0x3fc90fda */ 811 --- a/s_cosf.cpp 2022-12-11 21:15:55.494508001 -0500 812 +++ b/s_cosf.cpp_new 2022-12-11 21:12:37.396300160 -0500 813 @@ -15,15 +15,14 @@ 814 */ 815 816 #include <sys/cdefs.h> 817 __FBSDID("$FreeBSD$"); 818 819 #include <float.h> 820 821 -#include "math.h" 822 #define INLINE_KERNEL_COSDF 823 #define INLINE_KERNEL_SINDF 824 #define INLINE_REM_PIO2F 825 #include "math_private.h" 826 #include "e_rem_pio2f.c" 827 #include "k_cosf.c" 828 #include "k_sinf.c" 829 --- a/s_exp2.cpp 2022-12-11 21:15:55.790512181 -0500 830 +++ b/s_exp2.cpp_new 2022-12-11 21:12:34.476281131 -0500 831 @@ -27,15 +27,14 @@ 832 */ 833 834 #include <sys/cdefs.h> 835 __FBSDID("$FreeBSD$"); 836 837 #include <float.h> 838 839 -#include "math.h" 840 #include "math_private.h" 841 842 #define TBLBITS 8 843 #define TBLSIZE (1 << TBLBITS) 844 845 static const double 846 redux = 0x1.8p52 / TBLSIZE, 847 --- a/s_exp2f.cpp 2022-12-11 21:15:55.926514101 -0500 848 +++ b/s_exp2f.cpp_new 2022-12-11 21:12:30.644256149 -0500 849 @@ -27,15 +27,14 @@ 850 */ 851 852 #include <sys/cdefs.h> 853 __FBSDID("$FreeBSD$"); 854 855 #include <float.h> 856 857 -#include "math.h" 858 #include "math_private.h" 859 860 #define TBLBITS 4 861 #define TBLSIZE (1 << TBLBITS) 862 863 static const float 864 redux = 0x1.8p23f / TBLSIZE, 865 --- a/s_sinf.cpp 2022-12-11 21:15:57.618537960 -0500 866 +++ b/s_sinf.cpp_new 2022-12-11 21:12:24.684217270 -0500 867 @@ -15,15 +15,14 @@ 868 */ 869 870 #include <sys/cdefs.h> 871 __FBSDID("$FreeBSD$"); 872 873 #include <float.h> 874 875 -#include "math.h" 876 #define INLINE_KERNEL_COSDF 877 #define INLINE_KERNEL_SINDF 878 #define INLINE_REM_PIO2F 879 #include "math_private.h" 880 #include "e_rem_pio2f.c" 881 #include "k_cosf.c" 882 #include "k_sinf.c" 883 --- a/s_tanf.cpp 2022-12-11 21:15:57.930542357 -0500 884 +++ b/s_tanf.cpp_new 2022-12-11 21:12:20.420189437 -0500 885 @@ -15,15 +15,14 @@ 886 */ 887 888 #include <sys/cdefs.h> 889 __FBSDID("$FreeBSD$"); 890 891 #include <float.h> 892 893 -#include "math.h" 894 #define INLINE_KERNEL_TANDF 895 #define INLINE_REM_PIO2F 896 #include "math_private.h" 897 #include "e_rem_pio2f.c" 898 #include "k_tanf.c" 899 900 /* Small multiples of pi/2 rounded to double precision. */