| 1 |
diff --git a/e_acos.cpp b/e_acos.cpp |
| 2 |
--- a/e_acos.cpp |
| 3 |
+++ b/e_acos.cpp |
| 4 |
@@ -99,12 +99,8 @@ __ieee754_acos(double x) |
| 5 |
c = (z-df*df)/(s+df); |
| 6 |
p = z*(pS0+z*(pS1+z*(pS2+z*(pS3+z*(pS4+z*pS5))))); |
| 7 |
q = one+z*(qS1+z*(qS2+z*(qS3+z*qS4))); |
| 8 |
r = p/q; |
| 9 |
w = r*s+c; |
| 10 |
return 2.0*(df+w); |
| 11 |
} |
| 12 |
} |
| 13 |
- |
| 14 |
-#if LDBL_MANT_DIG == 53 |
| 15 |
-__weak_reference(acos, acosl); |
| 16 |
-#endif |
| 17 |
diff --git a/e_acosh.cpp b/e_acosh.cpp |
| 18 |
--- a/e_acosh.cpp |
| 19 |
+++ b/e_acosh.cpp |
| 20 |
@@ -56,12 +56,8 @@ __ieee754_acosh(double x) |
| 21 |
} else if (hx > 0x40000000) { /* 2**28 > x > 2 */ |
| 22 |
t=x*x; |
| 23 |
return __ieee754_log(2.0*x-one/(x+sqrt(t-one))); |
| 24 |
} else { /* 1<x<2 */ |
| 25 |
t = x-one; |
| 26 |
return log1p(t+sqrt(2.0*t+t*t)); |
| 27 |
} |
| 28 |
} |
| 29 |
- |
| 30 |
-#if LDBL_MANT_DIG == 53 |
| 31 |
-__weak_reference(acosh, acoshl); |
| 32 |
-#endif |
| 33 |
diff --git a/e_asin.cpp b/e_asin.cpp |
| 34 |
--- a/e_asin.cpp |
| 35 |
+++ b/e_asin.cpp |
| 36 |
@@ -105,12 +105,8 @@ __ieee754_asin(double x) |
| 37 |
c = (t-w*w)/(s+w); |
| 38 |
r = p/q; |
| 39 |
p = 2.0*s*r-(pio2_lo-2.0*c); |
| 40 |
q = pio4_hi-2.0*w; |
| 41 |
t = pio4_hi-(p-q); |
| 42 |
} |
| 43 |
if(hx>0) return t; else return -t; |
| 44 |
} |
| 45 |
- |
| 46 |
-#if LDBL_MANT_DIG == 53 |
| 47 |
-__weak_reference(asin, asinl); |
| 48 |
-#endif |
| 49 |
diff --git a/e_atan2.cpp b/e_atan2.cpp |
| 50 |
--- a/e_atan2.cpp |
| 51 |
+++ b/e_atan2.cpp |
| 52 |
@@ -117,12 +117,8 @@ __ieee754_atan2(double y, double x) |
| 53 |
switch (m) { |
| 54 |
case 0: return z ; /* atan(+,+) */ |
| 55 |
case 1: return -z ; /* atan(-,+) */ |
| 56 |
case 2: return pi-(z-pi_lo);/* atan(+,-) */ |
| 57 |
default: /* case 3 */ |
| 58 |
return (z-pi_lo)-pi;/* atan(-,-) */ |
| 59 |
} |
| 60 |
} |
| 61 |
- |
| 62 |
-#if LDBL_MANT_DIG == 53 |
| 63 |
-__weak_reference(atan2, atan2l); |
| 64 |
-#endif |
| 65 |
diff --git a/e_atanh.cpp b/e_atanh.cpp |
| 66 |
--- a/e_atanh.cpp |
| 67 |
+++ b/e_atanh.cpp |
| 68 |
@@ -56,12 +56,8 @@ __ieee754_atanh(double x) |
| 69 |
SET_HIGH_WORD(x,ix); |
| 70 |
if(ix<0x3fe00000) { /* x < 0.5 */ |
| 71 |
t = x+x; |
| 72 |
t = 0.5*log1p(t+t*x/(one-x)); |
| 73 |
} else |
| 74 |
t = 0.5*log1p((x+x)/(one-x)); |
| 75 |
if(hx>=0) return t; else return -t; |
| 76 |
} |
| 77 |
- |
| 78 |
-#if LDBL_MANT_DIG == 53 |
| 79 |
-__weak_reference(atanh, atanhl); |
| 80 |
-#endif |
| 81 |
diff --git a/e_cosh.cpp b/e_cosh.cpp |
| 82 |
--- a/e_cosh.cpp |
| 83 |
+++ b/e_cosh.cpp |
| 84 |
@@ -73,12 +73,8 @@ __ieee754_cosh(double x) |
| 85 |
|
| 86 |
/* |x| in [log(maxdouble), overflowthresold] */ |
| 87 |
if (ix<=0x408633CE) |
| 88 |
return __ldexp_exp(fabs(x), -1); |
| 89 |
|
| 90 |
/* |x| > overflowthresold, cosh(x) overflow */ |
| 91 |
return huge*huge; |
| 92 |
} |
| 93 |
- |
| 94 |
-#if (LDBL_MANT_DIG == 53) |
| 95 |
-__weak_reference(cosh, coshl); |
| 96 |
-#endif |
| 97 |
diff --git a/e_exp.cpp b/e_exp.cpp |
| 98 |
--- a/e_exp.cpp |
| 99 |
+++ b/e_exp.cpp |
| 100 |
@@ -152,12 +152,8 @@ __ieee754_exp(double x) /* default IEEE double exp */ |
| 101 |
else y = one-((lo-(x*c)/(2.0-c))-hi); |
| 102 |
if(k >= -1021) { |
| 103 |
if (k==1024) return y*2.0*0x1p1023; |
| 104 |
return y*twopk; |
| 105 |
} else { |
| 106 |
return y*twopk*twom1000; |
| 107 |
} |
| 108 |
} |
| 109 |
- |
| 110 |
-#if (LDBL_MANT_DIG == 53) |
| 111 |
-__weak_reference(exp, expl); |
| 112 |
-#endif |
| 113 |
diff --git a/e_hypot.cpp b/e_hypot.cpp |
| 114 |
--- a/e_hypot.cpp |
| 115 |
+++ b/e_hypot.cpp |
| 116 |
@@ -117,12 +117,8 @@ __ieee754_hypot(double x, double y) |
| 117 |
w = sqrt(t1*y1-(w*(-w)-(t1*y2+t2*b))); |
| 118 |
} |
| 119 |
if(k!=0) { |
| 120 |
t1 = 0.0; |
| 121 |
SET_HIGH_WORD(t1,(1023+k)<<20); |
| 122 |
return t1*w; |
| 123 |
} else return w; |
| 124 |
} |
| 125 |
- |
| 126 |
-#if LDBL_MANT_DIG == 53 |
| 127 |
-__weak_reference(hypot, hypotl); |
| 128 |
-#endif |
| 129 |
diff --git a/e_log.cpp b/e_log.cpp |
| 130 |
--- a/e_log.cpp |
| 131 |
+++ b/e_log.cpp |
| 132 |
@@ -135,12 +135,8 @@ __ieee754_log(double x) |
| 133 |
hfsq=0.5*f*f; |
| 134 |
if(k==0) return f-(hfsq-s*(hfsq+R)); else |
| 135 |
return dk*ln2_hi-((hfsq-(s*(hfsq+R)+dk*ln2_lo))-f); |
| 136 |
} else { |
| 137 |
if(k==0) return f-s*(f-R); else |
| 138 |
return dk*ln2_hi-((s*(f-R)-dk*ln2_lo)-f); |
| 139 |
} |
| 140 |
} |
| 141 |
- |
| 142 |
-#if (LDBL_MANT_DIG == 53) |
| 143 |
-__weak_reference(log, logl); |
| 144 |
-#endif |
| 145 |
diff --git a/e_log10.cpp b/e_log10.cpp |
| 146 |
--- a/e_log10.cpp |
| 147 |
+++ b/e_log10.cpp |
| 148 |
@@ -82,12 +82,8 @@ __ieee754_log10(double x) |
| 149 |
* with some parallelism and it reduces the error for many args. |
| 150 |
*/ |
| 151 |
w = y2 + val_hi; |
| 152 |
val_lo += (y2 - w) + val_hi; |
| 153 |
val_hi = w; |
| 154 |
|
| 155 |
return val_lo + val_hi; |
| 156 |
} |
| 157 |
- |
| 158 |
-#if (LDBL_MANT_DIG == 53) |
| 159 |
-__weak_reference(log10, log10l); |
| 160 |
-#endif |
| 161 |
diff --git a/e_log2.cpp b/e_log2.cpp |
| 162 |
--- a/e_log2.cpp |
| 163 |
+++ b/e_log2.cpp |
| 164 |
@@ -105,12 +105,8 @@ __ieee754_log2(double x) |
| 165 |
|
| 166 |
/* spadd(val_hi, val_lo, y), except for not using double_t: */ |
| 167 |
w = y + val_hi; |
| 168 |
val_lo += (y - w) + val_hi; |
| 169 |
val_hi = w; |
| 170 |
|
| 171 |
return val_lo + val_hi; |
| 172 |
} |
| 173 |
- |
| 174 |
-#if (LDBL_MANT_DIG == 53) |
| 175 |
-__weak_reference(log2, log2l); |
| 176 |
-#endif |
| 177 |
diff --git a/e_pow.cpp b/e_pow.cpp |
| 178 |
--- a/e_pow.cpp |
| 179 |
+++ b/e_pow.cpp |
| 180 |
@@ -302,12 +302,8 @@ __ieee754_pow(double x, double y) |
| 181 |
r = (z*t1)/(t1-two)-(w+z*w); |
| 182 |
z = one-(r-z); |
| 183 |
GET_HIGH_WORD(j,z); |
| 184 |
j += (n<<20); |
| 185 |
if((j>>20)<=0) z = scalbn(z,n); /* subnormal output */ |
| 186 |
else SET_HIGH_WORD(z,j); |
| 187 |
return s*z; |
| 188 |
} |
| 189 |
- |
| 190 |
-#if (LDBL_MANT_DIG == 53) |
| 191 |
-__weak_reference(pow, powl); |
| 192 |
-#endif |
| 193 |
diff --git a/e_sinh.cpp b/e_sinh.cpp |
| 194 |
--- a/e_sinh.cpp |
| 195 |
+++ b/e_sinh.cpp |
| 196 |
@@ -67,12 +67,8 @@ __ieee754_sinh(double x) |
| 197 |
|
| 198 |
/* |x| in [log(maxdouble), overflowthresold] */ |
| 199 |
if (ix<=0x408633CE) |
| 200 |
return h*2.0*__ldexp_exp(fabs(x), -1); |
| 201 |
|
| 202 |
/* |x| > overflowthresold, sinh(x) overflow */ |
| 203 |
return x*shuge; |
| 204 |
} |
| 205 |
- |
| 206 |
-#if (LDBL_MANT_DIG == 53) |
| 207 |
-__weak_reference(sinh, sinhl); |
| 208 |
-#endif |
| 209 |
diff --git a/s_asinh.cpp b/s_asinh.cpp |
| 210 |
--- a/s_asinh.cpp |
| 211 |
+++ b/s_asinh.cpp |
| 212 |
@@ -50,12 +50,8 @@ asinh(double x) |
| 213 |
t = fabs(x); |
| 214 |
w = __ieee754_log(2.0*t+one/(__ieee754_sqrt(x*x+one)+t)); |
| 215 |
} else { /* 2.0 > |x| > 2**-28 */ |
| 216 |
t = x*x; |
| 217 |
w =log1p(fabs(x)+t/(one+__ieee754_sqrt(one+t))); |
| 218 |
} |
| 219 |
if(hx>0) return w; else return -w; |
| 220 |
} |
| 221 |
- |
| 222 |
-#if LDBL_MANT_DIG == 53 |
| 223 |
-__weak_reference(asinh, asinhl); |
| 224 |
-#endif |
| 225 |
diff --git a/s_atan.cpp b/s_atan.cpp |
| 226 |
--- a/s_atan.cpp |
| 227 |
+++ b/s_atan.cpp |
| 228 |
@@ -112,12 +112,8 @@ atan(double x) |
| 229 |
s1 = z*(aT[0]+w*(aT[2]+w*(aT[4]+w*(aT[6]+w*(aT[8]+w*aT[10]))))); |
| 230 |
s2 = w*(aT[1]+w*(aT[3]+w*(aT[5]+w*(aT[7]+w*aT[9])))); |
| 231 |
if (id<0) return x - x*(s1+s2); |
| 232 |
else { |
| 233 |
z = atanhi[id] - ((x*(s1+s2) - atanlo[id]) - x); |
| 234 |
return (hx<0)? -z:z; |
| 235 |
} |
| 236 |
} |
| 237 |
- |
| 238 |
-#if LDBL_MANT_DIG == 53 |
| 239 |
-__weak_reference(atan, atanl); |
| 240 |
-#endif |
| 241 |
diff --git a/s_cbrt.cpp b/s_cbrt.cpp |
| 242 |
--- a/s_cbrt.cpp |
| 243 |
+++ b/s_cbrt.cpp |
| 244 |
@@ -106,12 +106,8 @@ cbrt(double x) |
| 245 |
s=t*t; /* t*t is exact */ |
| 246 |
r=x/s; /* error <= 0.5 ulps; |r| < |t| */ |
| 247 |
w=t+t; /* t+t is exact */ |
| 248 |
r=(r-t)/(w+r); /* r-t is exact; w+r ~= 3*t */ |
| 249 |
t=t+t*r; /* error <= (0.5 + 0.5/3) * ulp */ |
| 250 |
|
| 251 |
return(t); |
| 252 |
} |
| 253 |
- |
| 254 |
-#if (LDBL_MANT_DIG == 53) |
| 255 |
-__weak_reference(cbrt, cbrtl); |
| 256 |
-#endif |
| 257 |
diff --git a/s_ceil.cpp b/s_ceil.cpp |
| 258 |
--- a/s_ceil.cpp |
| 259 |
+++ b/s_ceil.cpp |
| 260 |
@@ -65,12 +65,8 @@ ceil(double x) |
| 261 |
} |
| 262 |
} |
| 263 |
i1 &= (~i); |
| 264 |
} |
| 265 |
} |
| 266 |
INSERT_WORDS(x,i0,i1); |
| 267 |
return x; |
| 268 |
} |
| 269 |
- |
| 270 |
-#if LDBL_MANT_DIG == 53 |
| 271 |
-__weak_reference(ceil, ceill); |
| 272 |
-#endif |
| 273 |
diff --git a/s_cos.cpp b/s_cos.cpp |
| 274 |
--- a/s_cos.cpp |
| 275 |
+++ b/s_cos.cpp |
| 276 |
@@ -77,12 +77,8 @@ cos(double x) |
| 277 |
case 0: return __kernel_cos(y[0],y[1]); |
| 278 |
case 1: return -__kernel_sin(y[0],y[1],1); |
| 279 |
case 2: return -__kernel_cos(y[0],y[1]); |
| 280 |
default: |
| 281 |
return __kernel_sin(y[0],y[1],1); |
| 282 |
} |
| 283 |
} |
| 284 |
} |
| 285 |
- |
| 286 |
-#if (LDBL_MANT_DIG == 53) |
| 287 |
-__weak_reference(cos, cosl); |
| 288 |
-#endif |
| 289 |
diff --git a/s_expm1.cpp b/s_expm1.cpp |
| 290 |
--- a/s_expm1.cpp |
| 291 |
+++ b/s_expm1.cpp |
| 292 |
@@ -210,12 +210,8 @@ expm1(double x) |
| 293 |
SET_HIGH_WORD(t,((0x3ff-k)<<20)); /* 2^-k */ |
| 294 |
y = x-(e+t); |
| 295 |
y += one; |
| 296 |
y = y*twopk; |
| 297 |
} |
| 298 |
} |
| 299 |
return y; |
| 300 |
} |
| 301 |
- |
| 302 |
-#if (LDBL_MANT_DIG == 53) |
| 303 |
-__weak_reference(expm1, expm1l); |
| 304 |
-#endif |
| 305 |
diff --git a/s_floor.cpp b/s_floor.cpp |
| 306 |
--- a/s_floor.cpp |
| 307 |
+++ b/s_floor.cpp |
| 308 |
@@ -66,12 +66,8 @@ floor(double x) |
| 309 |
} |
| 310 |
} |
| 311 |
i1 &= (~i); |
| 312 |
} |
| 313 |
} |
| 314 |
INSERT_WORDS(x,i0,i1); |
| 315 |
return x; |
| 316 |
} |
| 317 |
- |
| 318 |
-#if LDBL_MANT_DIG == 53 |
| 319 |
-__weak_reference(floor, floorl); |
| 320 |
-#endif |
| 321 |
diff --git a/s_log1p.cpp b/s_log1p.cpp |
| 322 |
--- a/s_log1p.cpp |
| 323 |
+++ b/s_log1p.cpp |
| 324 |
@@ -168,12 +168,8 @@ log1p(double x) |
| 325 |
return k*ln2_hi-((R-(k*ln2_lo+c))-f); |
| 326 |
} |
| 327 |
s = f/(2.0+f); |
| 328 |
z = s*s; |
| 329 |
R = z*(Lp1+z*(Lp2+z*(Lp3+z*(Lp4+z*(Lp5+z*(Lp6+z*Lp7)))))); |
| 330 |
if(k==0) return f-(hfsq-s*(hfsq+R)); else |
| 331 |
return k*ln2_hi-((hfsq-(s*(hfsq+R)+(k*ln2_lo+c)))-f); |
| 332 |
} |
| 333 |
- |
| 334 |
-#if (LDBL_MANT_DIG == 53) |
| 335 |
-__weak_reference(log1p, log1pl); |
| 336 |
-#endif |
| 337 |
diff --git a/s_rint.cpp b/s_rint.cpp |
| 338 |
--- a/s_rint.cpp |
| 339 |
+++ b/s_rint.cpp |
| 340 |
@@ -80,12 +80,8 @@ rint(double x) |
| 341 |
if((i1&i)==0) return x; /* x is integral */ |
| 342 |
i>>=1; |
| 343 |
if((i1&i)!=0) i1 = (i1&(~i))|((0x40000000)>>(j0-20)); |
| 344 |
} |
| 345 |
INSERT_WORDS(x,i0,i1); |
| 346 |
STRICT_ASSIGN(double,w,TWO52[sx]+x); |
| 347 |
return w-TWO52[sx]; |
| 348 |
} |
| 349 |
- |
| 350 |
-#if (LDBL_MANT_DIG == 53) |
| 351 |
-__weak_reference(rint, rintl); |
| 352 |
-#endif |
| 353 |
diff --git a/s_scalbn.cpp b/s_scalbn.cpp |
| 354 |
--- a/s_scalbn.cpp |
| 355 |
+++ b/s_scalbn.cpp |
| 356 |
@@ -36,13 +36,8 @@ double scalbn(double x, int n) |
| 357 |
if (n < -1022) |
| 358 |
n = -1022; |
| 359 |
} |
| 360 |
} |
| 361 |
u.i = (uint64_t)(0x3ff+n)<<52; |
| 362 |
x = y * u.f; |
| 363 |
return x; |
| 364 |
} |
| 365 |
- |
| 366 |
-#if (LDBL_MANT_DIG == 53) && !defined(scalbn) |
| 367 |
-__weak_reference(scalbn, ldexpl); |
| 368 |
-__weak_reference(scalbn, scalbnl); |
| 369 |
-#endif |
| 370 |
diff --git a/s_sin.cpp b/s_sin.cpp |
| 371 |
--- a/s_sin.cpp |
| 372 |
+++ b/s_sin.cpp |
| 373 |
@@ -77,12 +77,8 @@ sin(double x) |
| 374 |
case 0: return __kernel_sin(y[0],y[1],1); |
| 375 |
case 1: return __kernel_cos(y[0],y[1]); |
| 376 |
case 2: return -__kernel_sin(y[0],y[1],1); |
| 377 |
default: |
| 378 |
return -__kernel_cos(y[0],y[1]); |
| 379 |
} |
| 380 |
} |
| 381 |
} |
| 382 |
- |
| 383 |
-#if (LDBL_MANT_DIG == 53) |
| 384 |
-__weak_reference(sin, sinl); |
| 385 |
-#endif |
| 386 |
diff --git a/s_tan.cpp b/s_tan.cpp |
| 387 |
--- a/s_tan.cpp |
| 388 |
+++ b/s_tan.cpp |
| 389 |
@@ -71,12 +71,8 @@ tan(double x) |
| 390 |
|
| 391 |
/* argument reduction needed */ |
| 392 |
else { |
| 393 |
n = __ieee754_rem_pio2(x,y); |
| 394 |
return __kernel_tan(y[0],y[1],1-((n&1)<<1)); /* 1 -- n even |
| 395 |
-1 -- n odd */ |
| 396 |
} |
| 397 |
} |
| 398 |
- |
| 399 |
-#if (LDBL_MANT_DIG == 53) |
| 400 |
-__weak_reference(tan, tanl); |
| 401 |
-#endif |
| 402 |
diff --git a/s_tanh.cpp b/s_tanh.cpp |
| 403 |
--- a/s_tanh.cpp |
| 404 |
+++ b/s_tanh.cpp |
| 405 |
@@ -72,12 +72,8 @@ tanh(double x) |
| 406 |
z= -t/(t+two); |
| 407 |
} |
| 408 |
/* |x| >= 22, return +-1 */ |
| 409 |
} else { |
| 410 |
z = one - tiny; /* raise inexact flag */ |
| 411 |
} |
| 412 |
return (jx>=0)? z: -z; |
| 413 |
} |
| 414 |
- |
| 415 |
-#if (LDBL_MANT_DIG == 53) |
| 416 |
-__weak_reference(tanh, tanhl); |
| 417 |
-#endif |
| 418 |
diff --git a/s_trunc.cpp b/s_trunc.cpp |
| 419 |
--- a/s_trunc.cpp |
| 420 |
+++ b/s_trunc.cpp |
| 421 |
@@ -55,12 +55,8 @@ trunc(double x) |
| 422 |
i = ((u_int32_t)(0xffffffff))>>(j0-20); |
| 423 |
if((i1&i)==0) return x; /* x is integral */ |
| 424 |
if(huge+x>0.0) /* raise inexact flag */ |
| 425 |
i1 &= (~i); |
| 426 |
} |
| 427 |
INSERT_WORDS(x,i0,i1); |
| 428 |
return x; |
| 429 |
} |
| 430 |
- |
| 431 |
-#if LDBL_MANT_DIG == 53 |
| 432 |
-__weak_reference(trunc, truncl); |
| 433 |
-#endif |
| 434 |
--- a/s_exp2.cpp 2022-12-11 21:20:40.290068458 -0500 |
| 435 |
+++ b/s_exp2.cpp_new 2022-12-11 21:20:57.490259247 -0500 |
| 436 |
@@ -389,10 +389,6 @@ |
| 437 |
return (r * 2.0 * 0x1p1023); |
| 438 |
return (r * twopk); |
| 439 |
} else { |
| 440 |
return (r * twopkp1000 * twom1000); |
| 441 |
} |
| 442 |
} |
| 443 |
- |
| 444 |
-#if (LDBL_MANT_DIG == 53) |
| 445 |
-__weak_reference(exp2, exp2l); |
| 446 |
-#endif |
| 447 |
--- a/s_scalbnf.cpp |
| 448 |
+++ b/s_scalbnf.cpp |
| 449 |
@@ -32,10 +34,8 @@ |
| 450 |
if (n < -126) |
| 451 |
n = -126; |
| 452 |
} |
| 453 |
} |
| 454 |
u.i = (uint32_t)(0x7f+n)<<23; |
| 455 |
x = y * u.f; |
| 456 |
return x; |
| 457 |
} |
| 458 |
- |
| 459 |
-__strong_reference(scalbnf, ldexpf); |