static double slow1 (double x);
static double slow2 (double x);
static double sloww (double x, double dx, double orig);
-static double sloww1 (double x, double dx, double orig);
+static double sloww1 (double x, double dx, double orig, int m);
static double sloww2 (double x, double dx, double orig, int n);
static double bsloww (double x, double dx, double orig, int n);
static double bsloww1 (double x, double dx, double orig, int n);
int __branred (double x, double *a, double *aa);
static double cslow2 (double x);
static double csloww (double x, double dx, double orig);
-static double csloww1 (double x, double dx, double orig);
+static double csloww1 (double x, double dx, double orig, int m);
static double csloww2 (double x, double dx, double orig, int n);
/* Reduce range of X and compute sin of a + da. K is the amount by which to
else
{
if (a > 0)
- {
- m = 1;
- t = a;
- }
+ m = 1;
else
{
m = 0;
- t = -a;
+ a = -a;
da = -da;
}
- u.x = big + t;
- y = t - (u.x - big);
+ u.x = big + a;
+ y = a - (u.x - big);
xx = y * y;
s = y + (da + y * xx * (sn3 + xx * sn5));
c = y * da + xx * (cs2 + xx * (cs4 + xx * cs6));
cor = (sn - res) + cor;
cor = (cor > 0) ? 1.035 * cor + eps : 1.035 * cor - eps;
retval = ((res == res + cor) ? ((m) ? res : -res)
- : sloww1 (a, da, x));
+ : sloww1 (a, da, x, m));
}
break;
if (a > 0)
{
m = 1;
- t = a;
db = da;
}
else
{
m = 0;
- t = -a;
+ a = -a;
db = -da;
}
- u.x = big + t;
- y = t - (u.x - big);
+ u.x = big + a;
+ y = a - (u.x - big);
xx = y * y;
s = y + (db + y * xx * (sn3 + xx * sn5));
c = y * db + xx * (cs2 + xx * (cs4 + xx * cs6));
if (a > 0)
{
m = 1;
- t = a;
}
else
{
m = 0;
- t = -a;
+ a = -a;
da = -da;
}
- u.x = big + t;
- y = t - (u.x - big);
+ u.x = big + a;
+ y = a - (u.x - big);
xx = y * y;
s = y + (da + y * xx * (sn3 + xx * sn5));
c = y * da + xx * (cs2 + xx * (cs4 + xx * cs6));
cor = (sn - res) + cor;
cor = (cor > 0) ? 1.035 * cor + 1.0e-31 : 1.035 * cor - 1.0e-31;
retval = ((res == res + cor) ? ((m) ? res : -res)
- : csloww1 (a, da, x));
+ : csloww1 (a, da, x, m));
}
} /* else if (k < 0x400368fd) */
if (a > 0)
{
m = 1;
- t = a;
}
else
{
m = 0;
- t = -a;
+ a = -a;
da = -da;
}
- u.x = big + t;
- y = t - (u.x - big);
+ u.x = big + a;
+ y = a - (u.x - big);
xx = y * y;
s = y + (da + y * xx * (sn3 + xx * sn5));
c = y * da + xx * (cs2 + xx * (cs4 + xx * cs6));
cor = (sn - res) + cor;
cor = (cor > 0) ? 1.035 * cor + eps : 1.035 * cor - eps;
retval = ((res == res + cor) ? ((m) ? res : -res)
- : csloww1 (a, da, x));
+ : csloww1 (a, da, x, m));
}
break;
if (a > 0)
{
m = 1;
- t = a;
db = da;
}
else
{
m = 0;
- t = -a;
+ a = -a;
db = -da;
}
- u.x = big + t;
- y = t - (u.x - big);
+ u.x = big + a;
+ y = a - (u.x - big);
xx = y * y;
s = y + (db + y * xx * (sn3 + xx * sn5));
c = y * db + xx * (cs2 + xx * (cs4 + xx * cs6));
static double
SECTION
-sloww1 (double x, double dx, double orig)
+sloww1 (double x, double dx, double orig, int m)
{
mynumber u;
double sn, ssn, cs, ccs, s, c, w[2], y, y1, y2, c1, c2, xx, cor, res;
- y = ABS (x);
- u.x = big + y;
- y = y - (u.x - big);
+ u.x = big + x;
+ y = x - (u.x - big);
xx = y * y;
s = y * xx * (sn3 + xx * sn5);
c = xx * (cs2 + xx * (cs4 + xx * cs6));
cor = 1.0005 * cor - 3.1e-30 * ABS (orig);
if (res == res + cor)
- return (x > 0) ? res : -res;
+ return (m > 0) ? res : -res;
else
{
- __dubsin (ABS (x), dx, w);
+ __dubsin (x, dx, w);
if (w[1] > 0)
cor = 1.000000005 * w[1] + 1.1e-30 * ABS (orig);
cor = 1.000000005 * w[1] - 1.1e-30 * ABS (orig);
if (w[0] == w[0] + cor)
- return (x > 0) ? w[0] : -w[0];
+ return (m > 0) ? w[0] : -w[0];
else
return __mpsin (orig, 0, true);
}
static double
SECTION
-csloww1 (double x, double dx, double orig)
+csloww1 (double x, double dx, double orig, int m)
{
mynumber u;
double sn, ssn, cs, ccs, s, c, w[2], y, y1, y2, c1, c2, xx, cor, res;
- y = ABS (x);
- u.x = big + y;
- y = y - (u.x - big);
+ u.x = big + x;
+ y = x - (u.x - big);
xx = y * y;
s = y * xx * (sn3 + xx * sn5);
c = xx * (cs2 + xx * (cs4 + xx * cs6));
cor = 1.0005 * cor - 3.1e-30 * ABS (orig);
if (res == res + cor)
- return (x > 0) ? res : -res;
+ return (m > 0) ? res : -res;
else
{
- __dubsin (ABS (x), dx, w);
+ __dubsin (x, dx, w);
if (w[1] > 0)
cor = 1.000000005 * w[1] + 1.1e-30 * ABS (orig);
else
cor = 1.000000005 * w[1] - 1.1e-30 * ABS (orig);
if (w[0] == w[0] + cor)
- return (x > 0) ? w[0] : -w[0];
+ return (m > 0) ? w[0] : -w[0];
else
return __mpcos (orig, 0, true);
}