Replace vera++ with clang-format (#4518)
JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik robert.fancsik@h-lab.eu
This commit is contained in:
+10
-10
@@ -52,20 +52,20 @@
|
||||
* Function needed: sqrt
|
||||
*/
|
||||
|
||||
#define one 1.00000000000000000000e+00 /* 0x3FF00000, 0x00000000 */
|
||||
#define pi 3.14159265358979311600e+00 /* 0x400921FB, 0x54442D18 */
|
||||
#define pio2_hi 1.57079632679489655800e+00 /* 0x3FF921FB, 0x54442D18 */
|
||||
#define pio2_lo 6.12323399573676603587e-17 /* 0x3C91A626, 0x33145C07 */
|
||||
#define pS0 1.66666666666666657415e-01 /* 0x3FC55555, 0x55555555 */
|
||||
#define one 1.00000000000000000000e+00 /* 0x3FF00000, 0x00000000 */
|
||||
#define pi 3.14159265358979311600e+00 /* 0x400921FB, 0x54442D18 */
|
||||
#define pio2_hi 1.57079632679489655800e+00 /* 0x3FF921FB, 0x54442D18 */
|
||||
#define pio2_lo 6.12323399573676603587e-17 /* 0x3C91A626, 0x33145C07 */
|
||||
#define pS0 1.66666666666666657415e-01 /* 0x3FC55555, 0x55555555 */
|
||||
#define pS1 -3.25565818622400915405e-01 /* 0xBFD4D612, 0x03EB6F7D */
|
||||
#define pS2 2.01212532134862925881e-01 /* 0x3FC9C155, 0x0E884455 */
|
||||
#define pS2 2.01212532134862925881e-01 /* 0x3FC9C155, 0x0E884455 */
|
||||
#define pS3 -4.00555345006794114027e-02 /* 0xBFA48228, 0xB5688F3B */
|
||||
#define pS4 7.91534994289814532176e-04 /* 0x3F49EFE0, 0x7501B288 */
|
||||
#define pS5 3.47933107596021167570e-05 /* 0x3F023DE1, 0x0DFDF709 */
|
||||
#define pS4 7.91534994289814532176e-04 /* 0x3F49EFE0, 0x7501B288 */
|
||||
#define pS5 3.47933107596021167570e-05 /* 0x3F023DE1, 0x0DFDF709 */
|
||||
#define qS1 -2.40339491173441421878e+00 /* 0xC0033A27, 0x1C8A2D4B */
|
||||
#define qS2 2.02094576023350569471e+00 /* 0x40002AE5, 0x9C598AC8 */
|
||||
#define qS2 2.02094576023350569471e+00 /* 0x40002AE5, 0x9C598AC8 */
|
||||
#define qS3 -6.88283971605453293030e-01 /* 0xBFE6066C, 0x1B8D0159 */
|
||||
#define qS4 7.70381505559019352791e-02 /* 0x3FB3B8C5, 0xB12E9282 */
|
||||
#define qS4 7.70381505559019352791e-02 /* 0x3FB3B8C5, 0xB12E9282 */
|
||||
|
||||
double
|
||||
acos (double x)
|
||||
|
||||
+15
-15
@@ -57,22 +57,22 @@
|
||||
* if |x|>1, return NaN with invalid signal.
|
||||
*/
|
||||
|
||||
#define one 1.00000000000000000000e+00 /* 0x3FF00000, 0x00000000 */
|
||||
#define huge 1.000e+300
|
||||
#define pio2_hi 1.57079632679489655800e+00 /* 0x3FF921FB, 0x54442D18 */
|
||||
#define pio2_lo 6.12323399573676603587e-17 /* 0x3C91A626, 0x33145C07 */
|
||||
#define pio4_hi 7.85398163397448278999e-01 /* 0x3FE921FB, 0x54442D18 */
|
||||
#define one 1.00000000000000000000e+00 /* 0x3FF00000, 0x00000000 */
|
||||
#define huge 1.000e+300
|
||||
#define pio2_hi 1.57079632679489655800e+00 /* 0x3FF921FB, 0x54442D18 */
|
||||
#define pio2_lo 6.12323399573676603587e-17 /* 0x3C91A626, 0x33145C07 */
|
||||
#define pio4_hi 7.85398163397448278999e-01 /* 0x3FE921FB, 0x54442D18 */
|
||||
/* coefficient for R(x^2) */
|
||||
#define pS0 1.66666666666666657415e-01 /* 0x3FC55555, 0x55555555 */
|
||||
#define pS1 -3.25565818622400915405e-01 /* 0xBFD4D612, 0x03EB6F7D */
|
||||
#define pS2 2.01212532134862925881e-01 /* 0x3FC9C155, 0x0E884455 */
|
||||
#define pS3 -4.00555345006794114027e-02 /* 0xBFA48228, 0xB5688F3B */
|
||||
#define pS4 7.91534994289814532176e-04 /* 0x3F49EFE0, 0x7501B288 */
|
||||
#define pS5 3.47933107596021167570e-05 /* 0x3F023DE1, 0x0DFDF709 */
|
||||
#define qS1 -2.40339491173441421878e+00 /* 0xC0033A27, 0x1C8A2D4B */
|
||||
#define qS2 2.02094576023350569471e+00 /* 0x40002AE5, 0x9C598AC8 */
|
||||
#define qS3 -6.88283971605453293030e-01 /* 0xBFE6066C, 0x1B8D0159 */
|
||||
#define qS4 7.70381505559019352791e-02 /* 0x3FB3B8C5, 0xB12E9282 */
|
||||
#define pS0 1.66666666666666657415e-01 /* 0x3FC55555, 0x55555555 */
|
||||
#define pS1 -3.25565818622400915405e-01 /* 0xBFD4D612, 0x03EB6F7D */
|
||||
#define pS2 2.01212532134862925881e-01 /* 0x3FC9C155, 0x0E884455 */
|
||||
#define pS3 -4.00555345006794114027e-02 /* 0xBFA48228, 0xB5688F3B */
|
||||
#define pS4 7.91534994289814532176e-04 /* 0x3F49EFE0, 0x7501B288 */
|
||||
#define pS5 3.47933107596021167570e-05 /* 0x3F023DE1, 0x0DFDF709 */
|
||||
#define qS1 -2.40339491173441421878e+00 /* 0xC0033A27, 0x1C8A2D4B */
|
||||
#define qS2 2.02094576023350569471e+00 /* 0x40002AE5, 0x9C598AC8 */
|
||||
#define qS3 -6.88283971605453293030e-01 /* 0xBFE6066C, 0x1B8D0159 */
|
||||
#define qS4 7.70381505559019352791e-02 /* 0x3FB3B8C5, 0xB12E9282 */
|
||||
|
||||
double
|
||||
asin (double x)
|
||||
|
||||
+2
-2
@@ -38,8 +38,8 @@
|
||||
* := sign(x) * log1p(|x| + x^2 / (1 + sqrt(1 + x^2)))
|
||||
*/
|
||||
|
||||
#define one 1.0
|
||||
#define ln2 6.93147180559945286227e-01 /* 0x3FE62E42, 0xFEFA39EF */
|
||||
#define one 1.0
|
||||
#define ln2 6.93147180559945286227e-01 /* 0x3FE62E42, 0xFEFA39EF */
|
||||
#define huge 1.0e+300
|
||||
|
||||
double
|
||||
|
||||
+8
-10
@@ -48,33 +48,31 @@
|
||||
* to produce the hexadecimal values shown.
|
||||
*/
|
||||
|
||||
static const double atanhi[] =
|
||||
{
|
||||
static const double atanhi[] = {
|
||||
4.63647609000806093515e-01, /* atan(0.5)hi 0x3FDDAC67, 0x0561BB4F */
|
||||
7.85398163397448278999e-01, /* atan(1.0)hi 0x3FE921FB, 0x54442D18 */
|
||||
9.82793723247329054082e-01, /* atan(1.5)hi 0x3FEF730B, 0xD281F69B */
|
||||
1.57079632679489655800e+00, /* atan(inf)hi 0x3FF921FB, 0x54442D18 */
|
||||
};
|
||||
|
||||
static const double atanlo[] =
|
||||
{
|
||||
static const double atanlo[] = {
|
||||
2.26987774529616870924e-17, /* atan(0.5)lo 0x3C7A2B7F, 0x222F65E2 */
|
||||
3.06161699786838301793e-17, /* atan(1.0)lo 0x3C81A626, 0x33145C07 */
|
||||
1.39033110312309984516e-17, /* atan(1.5)lo 0x3C700788, 0x7AF0CBBD */
|
||||
6.12323399573676603587e-17, /* atan(inf)lo 0x3C91A626, 0x33145C07 */
|
||||
};
|
||||
|
||||
#define aT0 3.33333333333329318027e-01 /* 0x3FD55555, 0x5555550D */
|
||||
#define aT0 3.33333333333329318027e-01 /* 0x3FD55555, 0x5555550D */
|
||||
#define aT1 -1.99999999998764832476e-01 /* 0xBFC99999, 0x9998EBC4 */
|
||||
#define aT2 1.42857142725034663711e-01 /* 0x3FC24924, 0x920083FF */
|
||||
#define aT2 1.42857142725034663711e-01 /* 0x3FC24924, 0x920083FF */
|
||||
#define aT3 -1.11111104054623557880e-01 /* 0xBFBC71C6, 0xFE231671 */
|
||||
#define aT4 9.09088713343650656196e-02 /* 0x3FB745CD, 0xC54C206E */
|
||||
#define aT4 9.09088713343650656196e-02 /* 0x3FB745CD, 0xC54C206E */
|
||||
#define aT5 -7.69187620504482999495e-02 /* 0xBFB3B0F2, 0xAF749A6D */
|
||||
#define aT6 6.66107313738753120669e-02 /* 0x3FB10D66, 0xA0D03D51 */
|
||||
#define aT6 6.66107313738753120669e-02 /* 0x3FB10D66, 0xA0D03D51 */
|
||||
#define aT7 -5.83357013379057348645e-02 /* 0xBFADDE2D, 0x52DEFD9A */
|
||||
#define aT8 4.97687799461593236017e-02 /* 0x3FA97B4B, 0x24760DEB */
|
||||
#define aT8 4.97687799461593236017e-02 /* 0x3FA97B4B, 0x24760DEB */
|
||||
#define aT9 -3.65315727442169155270e-02 /* 0xBFA2B444, 0x2C6A6C2F */
|
||||
#define aT10 1.62858201153657823623e-02 /* 0x3F90AD3A, 0xE322DA11 */
|
||||
#define aT10 1.62858201153657823623e-02 /* 0x3F90AD3A, 0xE322DA11 */
|
||||
|
||||
#define one 1.0
|
||||
#define huge 1.0e300
|
||||
|
||||
+2
-2
@@ -36,7 +36,7 @@
|
||||
* 2 1 - x 1 - x
|
||||
*
|
||||
* For x < 0.5
|
||||
* atanh(x) = 0.5 * log1p(2x + 2x * x / (1 - x))
|
||||
* atanh(x) = 0.5 * log1p(2x + 2x * x / (1 - x))
|
||||
*
|
||||
* Special cases:
|
||||
* atanh(x) is NaN if |x| > 1 with signal;
|
||||
@@ -46,7 +46,7 @@
|
||||
*/
|
||||
|
||||
#define zero 0.0
|
||||
#define one 1.0
|
||||
#define one 1.0
|
||||
#define huge 1.0e+300
|
||||
|
||||
double
|
||||
|
||||
+5
-5
@@ -33,11 +33,11 @@
|
||||
|
||||
#define B1 715094163 /* B1 = (682 - 0.03306235651) * 2**20 */
|
||||
#define B2 696219795 /* B2 = (664 - 0.03306235651) * 2**20 */
|
||||
#define C 5.42857142857142815906e-01 /* 19/35 = 0x3FE15F15, 0xF15F15F1 */
|
||||
#define D -7.05306122448979611050e-01 /* -864/1225 = 0xBFE691DE, 0x2532C834 */
|
||||
#define E 1.41428571428571436819e+00 /* 99/70 = 0x3FF6A0EA, 0x0EA0EA0F */
|
||||
#define F 1.60714285714285720630e+00 /* 45/28 = 0x3FF9B6DB, 0x6DB6DB6E */
|
||||
#define G 3.57142857142857150787e-01 /* 5/14 = 0x3FD6DB6D, 0xB6DB6DB7 */
|
||||
#define C 5.42857142857142815906e-01 /* 19/35 = 0x3FE15F15, 0xF15F15F1 */
|
||||
#define D -7.05306122448979611050e-01 /* -864/1225 = 0xBFE691DE, 0x2532C834 */
|
||||
#define E 1.41428571428571436819e+00 /* 99/70 = 0x3FF6A0EA, 0x0EA0EA0F */
|
||||
#define F 1.60714285714285720630e+00 /* 45/28 = 0x3FF9B6DB, 0x6DB6DB6E */
|
||||
#define G 3.57142857142857150787e-01 /* 5/14 = 0x3FD6DB6D, 0xB6DB6DB7 */
|
||||
|
||||
double
|
||||
cbrt (double x)
|
||||
|
||||
+2
-3
@@ -49,7 +49,7 @@
|
||||
* only cosh(0) = 1 is exact for finite x.
|
||||
*/
|
||||
|
||||
#define one 1.0
|
||||
#define one 1.0
|
||||
#define half 0.5
|
||||
#define huge 1.0e300
|
||||
|
||||
@@ -96,8 +96,7 @@ cosh (double x)
|
||||
}
|
||||
/* |x| in [log(maxdouble), overflowthresold] */
|
||||
lx = ((1 >> 29) + (unsigned int) x);
|
||||
if ((ix < 0x408633CE) ||
|
||||
((ix == 0x408633ce) && (lx <= (unsigned) 0x8fb9f87d)))
|
||||
if ((ix < 0x408633CE) || ((ix == 0x408633ce) && (lx <= (unsigned) 0x8fb9f87d)))
|
||||
{
|
||||
w = exp (half * fabs (x));
|
||||
t = half * w;
|
||||
|
||||
+11
-14
@@ -89,33 +89,30 @@
|
||||
* to produce the hexadecimal values shown.
|
||||
*/
|
||||
|
||||
static const double halF[2] =
|
||||
{
|
||||
static const double halF[2] = {
|
||||
0.5,
|
||||
-0.5,
|
||||
};
|
||||
static const double ln2HI[2] =
|
||||
{
|
||||
static const double ln2HI[2] = {
|
||||
6.93147180369123816490e-01, /* 0x3fe62e42, 0xfee00000 */
|
||||
-6.93147180369123816490e-01, /* 0xbfe62e42, 0xfee00000 */
|
||||
};
|
||||
static const double ln2LO[2] =
|
||||
{
|
||||
static const double ln2LO[2] = {
|
||||
1.90821492927058770002e-10, /* 0x3dea39ef, 0x35793c76 */
|
||||
-1.90821492927058770002e-10, /* 0xbdea39ef, 0x35793c76 */
|
||||
};
|
||||
|
||||
#define one 1.0
|
||||
#define huge 1.0e+300
|
||||
#define twom1000 9.33263618503218878990e-302 /* 2**-1000=0x01700000,0 */
|
||||
#define o_threshold 7.09782712893383973096e+02 /* 0x40862E42, 0xFEFA39EF */
|
||||
#define one 1.0
|
||||
#define huge 1.0e+300
|
||||
#define twom1000 9.33263618503218878990e-302 /* 2**-1000=0x01700000,0 */
|
||||
#define o_threshold 7.09782712893383973096e+02 /* 0x40862E42, 0xFEFA39EF */
|
||||
#define u_threshold -7.45133219101941108420e+02 /* 0xc0874910, 0xD52D3051 */
|
||||
#define invln2 1.44269504088896338700e+00 /* 0x3ff71547, 0x652b82fe */
|
||||
#define P1 1.66666666666666019037e-01 /* 0x3FC55555, 0x5555553E */
|
||||
#define invln2 1.44269504088896338700e+00 /* 0x3ff71547, 0x652b82fe */
|
||||
#define P1 1.66666666666666019037e-01 /* 0x3FC55555, 0x5555553E */
|
||||
#define P2 -2.77777777770155933842e-03 /* 0xBF66C16C, 0x16BEBD93 */
|
||||
#define P3 6.61375632143793436117e-05 /* 0x3F11566A, 0xAF25DE2C */
|
||||
#define P3 6.61375632143793436117e-05 /* 0x3F11566A, 0xAF25DE2C */
|
||||
#define P4 -1.65339022054652515390e-06 /* 0xBEBBBD41, 0xC5D26BF1 */
|
||||
#define P5 4.13813679705723846039e-08 /* 0x3E663769, 0x72BEA4D0 */
|
||||
#define P5 4.13813679705723846039e-08 /* 0x3E663769, 0x72BEA4D0 */
|
||||
|
||||
double
|
||||
exp (double x) /* default IEEE double exp */
|
||||
|
||||
+10
-14
@@ -121,19 +121,19 @@
|
||||
* to produce the hexadecimal values shown.
|
||||
*/
|
||||
|
||||
#define one 1.0
|
||||
#define huge 1.0e+300
|
||||
#define tiny 1.0e-300
|
||||
#define one 1.0
|
||||
#define huge 1.0e+300
|
||||
#define tiny 1.0e-300
|
||||
#define o_threshold 7.09782712893383973096e+02 /* 0x40862E42, 0xFEFA39EF */
|
||||
#define ln2_hi 6.93147180369123816490e-01 /* 0x3fe62e42, 0xfee00000 */
|
||||
#define ln2_lo 1.90821492927058770002e-10 /* 0x3dea39ef, 0x35793c76 */
|
||||
#define invln2 1.44269504088896338700e+00 /* 0x3ff71547, 0x652b82fe */
|
||||
#define ln2_hi 6.93147180369123816490e-01 /* 0x3fe62e42, 0xfee00000 */
|
||||
#define ln2_lo 1.90821492927058770002e-10 /* 0x3dea39ef, 0x35793c76 */
|
||||
#define invln2 1.44269504088896338700e+00 /* 0x3ff71547, 0x652b82fe */
|
||||
|
||||
/* Scaled Q's: Qn_here = 2**n * Qn_above, for R(2*z) where z = hxs = x*x/2: */
|
||||
#define Q1 -3.33333333333331316428e-02 /* BFA11111 111110F4 */
|
||||
#define Q2 1.58730158725481460165e-03 /* 3F5A01A0 19FE5585 */
|
||||
#define Q2 1.58730158725481460165e-03 /* 3F5A01A0 19FE5585 */
|
||||
#define Q3 -7.93650757867487942473e-05 /* BF14CE19 9EAADBB7 */
|
||||
#define Q4 4.00821782732936239552e-06 /* 3ED0CFCA 86E65239 */
|
||||
#define Q4 4.00821782732936239552e-06 /* 3ED0CFCA 86E65239 */
|
||||
#define Q5 -2.01099218183624371326e-07 /* BE8AFDB7 6E09C32D */
|
||||
|
||||
double
|
||||
@@ -146,7 +146,7 @@ expm1 (double x)
|
||||
|
||||
hx = __HI (x);
|
||||
xsb = hx & 0x80000000; /* sign bit of x */
|
||||
hx &= 0x7fffffff; /* high word of |x| */
|
||||
hx &= 0x7fffffff; /* high word of |x| */
|
||||
|
||||
/* filter out huge and non-finite argument */
|
||||
if (hx >= 0x4043687A)
|
||||
@@ -265,11 +265,7 @@ expm1 (double x)
|
||||
y = one - (e - x);
|
||||
if (k == 1024)
|
||||
{
|
||||
const double twop1023 = ((double_accessor)
|
||||
{
|
||||
.as_int = { .hi = 0x7fe00000, .lo = 0 }
|
||||
}
|
||||
).dbl; /* 0x1p1023 */
|
||||
const double twop1023 = ((double_accessor){ .as_int = { .hi = 0x7fe00000, .lo = 0 } }).dbl; /* 0x1p1023 */
|
||||
y = y * 2.0 * twop1023;
|
||||
}
|
||||
else
|
||||
|
||||
+4
-1
@@ -33,7 +33,10 @@
|
||||
* Method: shift and subtract
|
||||
*/
|
||||
|
||||
static const double Zero[] = { 0.0, -0.0, };
|
||||
static const double Zero[] = {
|
||||
0.0,
|
||||
-0.0,
|
||||
};
|
||||
|
||||
double
|
||||
fmod (double x, double y)
|
||||
|
||||
+15
-16
@@ -17,32 +17,31 @@
|
||||
#define JERRY_MATH_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C"
|
||||
{
|
||||
extern "C" {
|
||||
#endif /* __cplusplus */
|
||||
|
||||
/* General Constants. */
|
||||
#ifdef _MSC_VER
|
||||
#define INFINITY ((float) (1e+300 * 1e+300)) /* 1e+300*1e+300 must overflow */
|
||||
#define NAN ((float) (INFINITY * 0.0f))
|
||||
#define INFINITY ((float) (1e+300 * 1e+300)) /* 1e+300*1e+300 must overflow */
|
||||
#define NAN ((float) (INFINITY * 0.0f))
|
||||
#else /* !_MSC_VER */
|
||||
#define INFINITY ((float) (1.0 / 0.0))
|
||||
#define NAN ((float) (0.0 / 0.0))
|
||||
#define INFINITY ((float) (1.0 / 0.0))
|
||||
#define NAN ((float) (0.0 / 0.0))
|
||||
#endif /* _MSC_VER */
|
||||
#define HUGE_VAL ((double) INFINITY)
|
||||
#define HUGE_VAL ((double) INFINITY)
|
||||
|
||||
#define isnan(x) ((x) != (x))
|
||||
#define isinf(x) ((x) == INFINITY ? 1 : (x) == -INFINITY ? -1 : 0)
|
||||
#define isfinite(x) (!isinf(x) && !isnan(x))
|
||||
#define isfinite(x) (!isinf (x) && !isnan (x))
|
||||
|
||||
/* Exponential and Logarithmic constants. */
|
||||
#define M_E 2.7182818284590452353602874713526625
|
||||
#define M_SQRT2 1.4142135623730950488016887242096981
|
||||
#define M_SQRT1_2 0.7071067811865475244008443621048490
|
||||
#define M_LOG2E 1.4426950408889634073599246810018921
|
||||
#define M_LOG10E 0.4342944819032518276511289189166051
|
||||
#define M_LN2 0.6931471805599453094172321214581765
|
||||
#define M_LN10 2.3025850929940456840179914546843642
|
||||
#define M_E 2.7182818284590452353602874713526625
|
||||
#define M_SQRT2 1.4142135623730950488016887242096981
|
||||
#define M_SQRT1_2 0.7071067811865475244008443621048490
|
||||
#define M_LOG2E 1.4426950408889634073599246810018921
|
||||
#define M_LOG10E 0.4342944819032518276511289189166051
|
||||
#define M_LN2 0.6931471805599453094172321214581765
|
||||
#define M_LN10 2.3025850929940456840179914546843642
|
||||
|
||||
/* Trigonometric Constants. */
|
||||
#define M_PI 3.1415926535897932384626433832795029
|
||||
@@ -95,6 +94,6 @@ double fmod (double, double);
|
||||
double nextafter (double, double);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
} /* __cplusplus_extern_C */
|
||||
#endif /* __cplusplus */
|
||||
#endif /* !JERRY_MATH_H */
|
||||
|
||||
@@ -35,17 +35,13 @@
|
||||
* If byte order is supported and set to little or target is among common
|
||||
* cases checked define __LITTLE_ENDIAN.
|
||||
*/
|
||||
#if (defined (i386) || defined (__i386) || defined (__i386__) || \
|
||||
defined (i486) || defined (__i486) || defined (__i486__) || \
|
||||
defined (intel) || defined (x86) || defined (i86pc) || \
|
||||
defined (_M_IX86) || defined (_M_AMD64) || defined (_M_X64) || \
|
||||
defined (__alpha) || defined (__osf__) || \
|
||||
defined (__x86_64__) || defined (__arm__) || defined (__aarch64__) || \
|
||||
defined (_M_ARM) || defined (_M_ARM64) || \
|
||||
defined (__xtensa__) || defined (__MIPSEL)) || \
|
||||
(defined (__BYTE_ORDER__) && (__BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__))
|
||||
#if (defined(i386) || defined(__i386) || defined(__i386__) || defined(i486) || defined(__i486) || defined(__i486__) \
|
||||
|| defined(intel) || defined(x86) || defined(i86pc) || defined(_M_IX86) || defined(_M_AMD64) || defined(_M_X64) \
|
||||
|| defined(__alpha) || defined(__osf__) || defined(__x86_64__) || defined(__arm__) || defined(__aarch64__) \
|
||||
|| defined(_M_ARM) || defined(_M_ARM64) || defined(__xtensa__) || defined(__MIPSEL)) \
|
||||
|| (defined(__BYTE_ORDER__) && (__BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__))
|
||||
#define __LITTLE_ENDIAN
|
||||
#endif
|
||||
#endif /* platform defines */
|
||||
#endif /* !__LITTLE_ENDIAN */
|
||||
|
||||
#ifdef __LITTLE_ENDIAN
|
||||
@@ -77,11 +73,11 @@ typedef union
|
||||
|
||||
#ifndef NAN
|
||||
#ifdef _MSC_VER
|
||||
#define INFINITY ((float) (1e+300 * 1e+300)) /* 1e+300*1e+300 must overflow */
|
||||
#define NAN ((float) (INFINITY * 0.0f))
|
||||
#define INFINITY ((float) (1e+300 * 1e+300)) /* 1e+300*1e+300 must overflow */
|
||||
#define NAN ((float) (INFINITY * 0.0f))
|
||||
#else /* !_MSC_VER */
|
||||
#define INFINITY ((float) (1.0 / 0.0))
|
||||
#define NAN ((float) (0.0 / 0.0))
|
||||
#define INFINITY ((float) (1.0 / 0.0))
|
||||
#define NAN ((float) (0.0 / 0.0))
|
||||
#endif /* _MSC_VER */
|
||||
#endif /* !NAN */
|
||||
|
||||
|
||||
+4
-4
@@ -60,9 +60,9 @@
|
||||
* shown.
|
||||
*/
|
||||
|
||||
#define zero 0.0
|
||||
#define two54 1.80143985094819840000e+16 /* 0x43500000, 0x00000000 */
|
||||
#define ivln10 4.34294481903251816668e-01 /* 0x3FDBCB7B, 0x1526E50E */
|
||||
#define zero 0.0
|
||||
#define two54 1.80143985094819840000e+16 /* 0x43500000, 0x00000000 */
|
||||
#define ivln10 4.34294481903251816668e-01 /* 0x3FDBCB7B, 0x1526E50E */
|
||||
#define log10_2hi 3.01029995663611771306e-01 /* 0x3FD34413, 0x509F6000 */
|
||||
#define log10_2lo 3.69423907715893078616e-13 /* 0x3D59FEF3, 0x11F12B36 */
|
||||
|
||||
@@ -92,7 +92,7 @@ log10 (double x)
|
||||
return NAN;
|
||||
}
|
||||
k -= 54;
|
||||
x *= two54; /* subnormal number, scale up x */
|
||||
x *= two54; /* subnormal number, scale up x */
|
||||
hx = __HI (x); /* high word of x */
|
||||
}
|
||||
if (hx >= 0x7ff00000)
|
||||
|
||||
+12
-13
@@ -90,17 +90,17 @@
|
||||
* See HP-15C Advanced Functions Handbook, p.193.
|
||||
*/
|
||||
|
||||
#define zero 0.0
|
||||
#define zero 0.0
|
||||
#define ln2_hi 6.93147180369123816490e-01 /* 3fe62e42 fee00000 */
|
||||
#define ln2_lo 1.90821492927058770002e-10 /* 3dea39ef 35793c76 */
|
||||
#define two54 1.80143985094819840000e+16 /* 43500000 00000000 */
|
||||
#define Lp1 6.666666666666735130e-01 /* 3FE55555 55555593 */
|
||||
#define Lp2 3.999999999940941908e-01 /* 3FD99999 9997FA04 */
|
||||
#define Lp3 2.857142874366239149e-01 /* 3FD24924 94229359 */
|
||||
#define Lp4 2.222219843214978396e-01 /* 3FCC71C5 1D8E78AF */
|
||||
#define Lp5 1.818357216161805012e-01 /* 3FC74664 96CB03DE */
|
||||
#define Lp6 1.531383769920937332e-01 /* 3FC39A09 D078C69F */
|
||||
#define Lp7 1.479819860511658591e-01 /* 3FC2F112 DF3E5244 */
|
||||
#define two54 1.80143985094819840000e+16 /* 43500000 00000000 */
|
||||
#define Lp1 6.666666666666735130e-01 /* 3FE55555 55555593 */
|
||||
#define Lp2 3.999999999940941908e-01 /* 3FD99999 9997FA04 */
|
||||
#define Lp3 2.857142874366239149e-01 /* 3FD24924 94229359 */
|
||||
#define Lp4 2.222219843214978396e-01 /* 3FCC71C5 1D8E78AF */
|
||||
#define Lp5 1.818357216161805012e-01 /* 3FC74664 96CB03DE */
|
||||
#define Lp6 1.531383769920937332e-01 /* 3FC39A09 D078C69F */
|
||||
#define Lp7 1.479819860511658591e-01 /* 3FC2F112 DF3E5244 */
|
||||
|
||||
double
|
||||
log1p (double x)
|
||||
@@ -131,8 +131,8 @@ log1p (double x)
|
||||
}
|
||||
}
|
||||
if (ax < 0x3e200000)
|
||||
{ /* |x| < 2**-29 */
|
||||
if ((two54 + x > zero) /* raise inexact */
|
||||
{ /* |x| < 2**-29 */
|
||||
if ((two54 + x > zero) /* raise inexact */
|
||||
&& (ax < 0x3c900000)) /* |x| < 2**-54 */
|
||||
{
|
||||
return x;
|
||||
@@ -220,8 +220,7 @@ log1p (double x)
|
||||
}
|
||||
s = f / (2.0 + f);
|
||||
z = s * s;
|
||||
R = z * (Lp1 +
|
||||
z * (Lp2 + z * (Lp3 + z * (Lp4 + z * (Lp5 + z * (Lp6 + z * Lp7))))));
|
||||
R = z * (Lp1 + z * (Lp2 + z * (Lp3 + z * (Lp4 + z * (Lp5 + z * (Lp6 + z * Lp7))))));
|
||||
if (k == 0)
|
||||
{
|
||||
return f - (hfsq - s * (hfsq + R));
|
||||
|
||||
+10
-10
@@ -37,17 +37,17 @@
|
||||
* in not-quite-routine extra precision.
|
||||
*/
|
||||
|
||||
#define zero 0.0
|
||||
#define two54 1.80143985094819840000e+16 /* 0x43500000, 0x00000000 */
|
||||
#define zero 0.0
|
||||
#define two54 1.80143985094819840000e+16 /* 0x43500000, 0x00000000 */
|
||||
#define ivln2hi 1.44269504072144627571e+00 /* 0x3FF71547, 0x65200000 */
|
||||
#define ivln2lo 1.67517131648865118353e-10 /* 0x3DE705FC, 0x2EEFA200 */
|
||||
#define Lg1 6.666666666666735130e-01 /* 0x3FE55555, 0x55555593 */
|
||||
#define Lg2 3.999999999940941908e-01 /* 0x3FD99999, 0x9997FA04 */
|
||||
#define Lg3 2.857142874366239149e-01 /* 0x3FD24924, 0x94229359 */
|
||||
#define Lg4 2.222219843214978396e-01 /* 0x3FCC71C5, 0x1D8E78AF */
|
||||
#define Lg5 1.818357216161805012e-01 /* 0x3FC74664, 0x96CB03DE */
|
||||
#define Lg6 1.531383769920937332e-01 /* 0x3FC39A09, 0xD078C69F */
|
||||
#define Lg7 1.479819860511658591e-01 /* 0x3FC2F112, 0xDF3E5244 */
|
||||
#define Lg1 6.666666666666735130e-01 /* 0x3FE55555, 0x55555593 */
|
||||
#define Lg2 3.999999999940941908e-01 /* 0x3FD99999, 0x9997FA04 */
|
||||
#define Lg3 2.857142874366239149e-01 /* 0x3FD24924, 0x94229359 */
|
||||
#define Lg4 2.222219843214978396e-01 /* 0x3FCC71C5, 0x1D8E78AF */
|
||||
#define Lg5 1.818357216161805012e-01 /* 0x3FC74664, 0x96CB03DE */
|
||||
#define Lg6 1.531383769920937332e-01 /* 0x3FC39A09, 0xD078C69F */
|
||||
#define Lg7 1.479819860511658591e-01 /* 0x3FC2F112, 0xDF3E5244 */
|
||||
|
||||
double
|
||||
log2 (double x)
|
||||
@@ -72,7 +72,7 @@ log2 (double x)
|
||||
return NAN; /* log(-#) = NaN */
|
||||
}
|
||||
k -= 54;
|
||||
x *= two54; /* subnormal number, scale up x */
|
||||
x *= two54; /* subnormal number, scale up x */
|
||||
hx = __HI (x); /* high word of x */
|
||||
}
|
||||
if (hx >= 0x7ff00000)
|
||||
|
||||
@@ -28,8 +28,7 @@
|
||||
#include "jerry-math-internal.h"
|
||||
|
||||
double
|
||||
nextafter (double x,
|
||||
double y)
|
||||
nextafter (double x, double y)
|
||||
{
|
||||
int hx, hy, ix, iy;
|
||||
unsigned lx, ly;
|
||||
@@ -42,7 +41,7 @@ nextafter (double x,
|
||||
ix = hx & 0x7fffffff; /* |x| */
|
||||
iy = hy & 0x7fffffff; /* |y| */
|
||||
|
||||
if (((ix >= 0x7ff00000) && ((ix - 0x7ff00000) | lx) != 0) /* x is nan */
|
||||
if (((ix >= 0x7ff00000) && ((ix - 0x7ff00000) | lx) != 0) /* x is nan */
|
||||
|| ((iy >= 0x7ff00000) && ((iy - 0x7ff00000) | ly) != 0)) /* y is nan */
|
||||
{
|
||||
return x + y;
|
||||
|
||||
+26
-29
@@ -72,50 +72,47 @@
|
||||
* to produce the hexadecimal values shown.
|
||||
*/
|
||||
|
||||
static const double bp[] =
|
||||
{
|
||||
static const double bp[] = {
|
||||
1.0,
|
||||
1.5,
|
||||
};
|
||||
static const double dp_h[] =
|
||||
{
|
||||
static const double dp_h[] = {
|
||||
0.0,
|
||||
5.84962487220764160156e-01, /* 0x3FE2B803, 0x40000000 */
|
||||
};
|
||||
static const double dp_l[] =
|
||||
{
|
||||
static const double dp_l[] = {
|
||||
0.0,
|
||||
1.35003920212974897128e-08, /* 0x3E4CFDEB, 0x43CFD006 */
|
||||
};
|
||||
|
||||
#define zero 0.0
|
||||
#define one 1.0
|
||||
#define two 2.0
|
||||
#define two53 9007199254740992.0 /* 0x43400000, 0x00000000 */
|
||||
#define huge 1.0e300
|
||||
#define tiny 1.0e-300
|
||||
#define zero 0.0
|
||||
#define one 1.0
|
||||
#define two 2.0
|
||||
#define two53 9007199254740992.0 /* 0x43400000, 0x00000000 */
|
||||
#define huge 1.0e300
|
||||
#define tiny 1.0e-300
|
||||
/* poly coefs for (3/2) * (log(x) - 2s - 2/3 * s**3 */
|
||||
#define L1 5.99999999999994648725e-01 /* 0x3FE33333, 0x33333303 */
|
||||
#define L2 4.28571428578550184252e-01 /* 0x3FDB6DB6, 0xDB6FABFF */
|
||||
#define L3 3.33333329818377432918e-01 /* 0x3FD55555, 0x518F264D */
|
||||
#define L4 2.72728123808534006489e-01 /* 0x3FD17460, 0xA91D4101 */
|
||||
#define L5 2.30660745775561754067e-01 /* 0x3FCD864A, 0x93C9DB65 */
|
||||
#define L6 2.06975017800338417784e-01 /* 0x3FCA7E28, 0x4A454EEF */
|
||||
#define P1 1.66666666666666019037e-01 /* 0x3FC55555, 0x5555553E */
|
||||
#define L1 5.99999999999994648725e-01 /* 0x3FE33333, 0x33333303 */
|
||||
#define L2 4.28571428578550184252e-01 /* 0x3FDB6DB6, 0xDB6FABFF */
|
||||
#define L3 3.33333329818377432918e-01 /* 0x3FD55555, 0x518F264D */
|
||||
#define L4 2.72728123808534006489e-01 /* 0x3FD17460, 0xA91D4101 */
|
||||
#define L5 2.30660745775561754067e-01 /* 0x3FCD864A, 0x93C9DB65 */
|
||||
#define L6 2.06975017800338417784e-01 /* 0x3FCA7E28, 0x4A454EEF */
|
||||
#define P1 1.66666666666666019037e-01 /* 0x3FC55555, 0x5555553E */
|
||||
#define P2 -2.77777777770155933842e-03 /* 0xBF66C16C, 0x16BEBD93 */
|
||||
#define P3 6.61375632143793436117e-05 /* 0x3F11566A, 0xAF25DE2C */
|
||||
#define P3 6.61375632143793436117e-05 /* 0x3F11566A, 0xAF25DE2C */
|
||||
#define P4 -1.65339022054652515390e-06 /* 0xBEBBBD41, 0xC5D26BF1 */
|
||||
#define P5 4.13813679705723846039e-08 /* 0x3E663769, 0x72BEA4D0 */
|
||||
#define lg2 6.93147180559945286227e-01 /* 0x3FE62E42, 0xFEFA39EF */
|
||||
#define lg2_h 6.93147182464599609375e-01 /* 0x3FE62E43, 0x00000000 */
|
||||
#define P5 4.13813679705723846039e-08 /* 0x3E663769, 0x72BEA4D0 */
|
||||
#define lg2 6.93147180559945286227e-01 /* 0x3FE62E42, 0xFEFA39EF */
|
||||
#define lg2_h 6.93147182464599609375e-01 /* 0x3FE62E43, 0x00000000 */
|
||||
#define lg2_l -1.90465429995776804525e-09 /* 0xBE205C61, 0x0CA86C39 */
|
||||
#define ovt 8.0085662595372944372e-0017 /* -(1024-log2(ovfl+.5ulp)) */
|
||||
#define cp 9.61796693925975554329e-01 /* 0x3FEEC709, 0xDC3A03FD = 2 / (3 ln2) */
|
||||
#define cp_h 9.61796700954437255859e-01 /* 0x3FEEC709, 0xE0000000 = (float) cp */
|
||||
#define ovt 8.0085662595372944372e-0017 /* -(1024-log2(ovfl+.5ulp)) */
|
||||
#define cp 9.61796693925975554329e-01 /* 0x3FEEC709, 0xDC3A03FD = 2 / (3 ln2) */
|
||||
#define cp_h 9.61796700954437255859e-01 /* 0x3FEEC709, 0xE0000000 = (float) cp */
|
||||
#define cp_l -7.02846165095275826516e-09 /* 0xBE3E2FE0, 0x145B01F5 = tail of cp_h */
|
||||
#define ivln2 1.44269504088896338700e+00 /* 0x3FF71547, 0x652B82FE = 1 / ln2 */
|
||||
#define ivln2_h 1.44269502162933349609e+00 /* 0x3FF71547, 0x60000000 = 24b 1 / ln2 */
|
||||
#define ivln2_l 1.92596299112661746887e-08 /* 0x3E54AE0B, 0xF85DDF44 = 1 / ln2 tail */
|
||||
#define ivln2 1.44269504088896338700e+00 /* 0x3FF71547, 0x652B82FE = 1 / ln2 */
|
||||
#define ivln2_h 1.44269502162933349609e+00 /* 0x3FF71547, 0x60000000 = 24b 1 / ln2 */
|
||||
#define ivln2_l 1.92596299112661746887e-08 /* 0x3E54AE0B, 0xF85DDF44 = 1 / ln2 tail */
|
||||
|
||||
double
|
||||
pow (double x, double y)
|
||||
|
||||
+2
-2
@@ -45,8 +45,8 @@
|
||||
* only sinh(0) = 0 is exact for finite x.
|
||||
*/
|
||||
|
||||
#define one 1.0
|
||||
#define half 0.5
|
||||
#define one 1.0
|
||||
#define half 0.5
|
||||
#define shuge 1.0e307
|
||||
|
||||
double
|
||||
|
||||
+2
-2
@@ -54,8 +54,8 @@
|
||||
* tanh(NaN) is NaN;
|
||||
* only tanh(0) = 0 is exact for finite x.
|
||||
*/
|
||||
#define one 1.0
|
||||
#define two 2.0
|
||||
#define one 1.0
|
||||
#define two 2.0
|
||||
#define tiny 1.0e-300
|
||||
|
||||
double
|
||||
|
||||
+45
-58
@@ -34,11 +34,11 @@
|
||||
|
||||
#include "jerry-math-internal.h"
|
||||
|
||||
#define zero 0.00000000000000000000e+00 /* 0x00000000, 0x00000000 */
|
||||
#define half 5.00000000000000000000e-01 /* 0x3FE00000, 0x00000000 */
|
||||
#define one 1.00000000000000000000e+00 /* 0x3FF00000, 0x00000000 */
|
||||
#define two24 1.67772160000000000000e+07 /* 0x41700000, 0x00000000 */
|
||||
#define twon24 5.96046447753906250000e-08 /* 0x3E700000, 0x00000000 */
|
||||
#define zero 0.00000000000000000000e+00 /* 0x00000000, 0x00000000 */
|
||||
#define half 5.00000000000000000000e-01 /* 0x3FE00000, 0x00000000 */
|
||||
#define one 1.00000000000000000000e+00 /* 0x3FF00000, 0x00000000 */
|
||||
#define two24 1.67772160000000000000e+07 /* 0x41700000, 0x00000000 */
|
||||
#define twon24 5.96046447753906250000e-08 /* 0x3E700000, 0x00000000 */
|
||||
|
||||
/* __kernel_rem_pio2(x,y,e0,nx,prec)
|
||||
* double x[],y[]; int e0,nx,prec;
|
||||
@@ -151,13 +151,9 @@
|
||||
*/
|
||||
|
||||
/* initial value for jk */
|
||||
static const int init_jk[] =
|
||||
{
|
||||
2, 3, 4, 6
|
||||
};
|
||||
static const int init_jk[] = { 2, 3, 4, 6 };
|
||||
|
||||
static const double PIo2[] =
|
||||
{
|
||||
static const double PIo2[] = {
|
||||
1.57079625129699707031e+00, /* 0x3FF921FB, 0x40000000 */
|
||||
7.54978941586159635335e-08, /* 0x3E74442D, 0x00000000 */
|
||||
5.39030252995776476554e-15, /* 0x3CF84698, 0x80000000 */
|
||||
@@ -171,19 +167,13 @@ static const double PIo2[] =
|
||||
/*
|
||||
* Table of constants for 2/pi, 396 Hex digits (476 decimal) of 2/pi
|
||||
*/
|
||||
static const int ipio2[] =
|
||||
{
|
||||
0xA2F983, 0x6E4E44, 0x1529FC, 0x2757D1, 0xF534DD, 0xC0DB62,
|
||||
0x95993C, 0x439041, 0xFE5163, 0xABDEBB, 0xC561B7, 0x246E3A,
|
||||
0x424DD2, 0xE00649, 0x2EEA09, 0xD1921C, 0xFE1DEB, 0x1CB129,
|
||||
0xA73EE8, 0x8235F5, 0x2EBB44, 0x84E99C, 0x7026B4, 0x5F7E41,
|
||||
0x3991D6, 0x398353, 0x39F49C, 0x845F8B, 0xBDF928, 0x3B1FF8,
|
||||
0x97FFDE, 0x05980F, 0xEF2F11, 0x8B5A0A, 0x6D1F6D, 0x367ECF,
|
||||
0x27CB09, 0xB74F46, 0x3F669E, 0x5FEA2D, 0x7527BA, 0xC7EBE5,
|
||||
0xF17B3D, 0x0739F7, 0x8A5292, 0xEA6BFB, 0x5FB11F, 0x8D5D08,
|
||||
0x560330, 0x46FC7B, 0x6BABF0, 0xCFBC20, 0x9AF436, 0x1DA9E3,
|
||||
0x91615E, 0xE61B08, 0x659985, 0x5F14A0, 0x68408D, 0xFFD880,
|
||||
0x4D7327, 0x310606, 0x1556CA, 0x73A8C9, 0x60E27B, 0xC08C6B,
|
||||
static const int ipio2[] = {
|
||||
0xA2F983, 0x6E4E44, 0x1529FC, 0x2757D1, 0xF534DD, 0xC0DB62, 0x95993C, 0x439041, 0xFE5163, 0xABDEBB, 0xC561B7,
|
||||
0x246E3A, 0x424DD2, 0xE00649, 0x2EEA09, 0xD1921C, 0xFE1DEB, 0x1CB129, 0xA73EE8, 0x8235F5, 0x2EBB44, 0x84E99C,
|
||||
0x7026B4, 0x5F7E41, 0x3991D6, 0x398353, 0x39F49C, 0x845F8B, 0xBDF928, 0x3B1FF8, 0x97FFDE, 0x05980F, 0xEF2F11,
|
||||
0x8B5A0A, 0x6D1F6D, 0x367ECF, 0x27CB09, 0xB74F46, 0x3F669E, 0x5FEA2D, 0x7527BA, 0xC7EBE5, 0xF17B3D, 0x0739F7,
|
||||
0x8A5292, 0xEA6BFB, 0x5FB11F, 0x8D5D08, 0x560330, 0x46FC7B, 0x6BABF0, 0xCFBC20, 0x9AF436, 0x1DA9E3, 0x91615E,
|
||||
0xE61B08, 0x659985, 0x5F14A0, 0x68408D, 0xFFD880, 0x4D7327, 0x310606, 0x1556CA, 0x73A8C9, 0x60E27B, 0xC08C6B,
|
||||
};
|
||||
|
||||
static int
|
||||
@@ -445,14 +435,11 @@ recompute:
|
||||
* use __kernel_rem_pio2()
|
||||
*/
|
||||
|
||||
static const int npio2_hw[] =
|
||||
{
|
||||
0x3FF921FB, 0x400921FB, 0x4012D97C, 0x401921FB, 0x401F6A7A, 0x4022D97C,
|
||||
0x4025FDBB, 0x402921FB, 0x402C463A, 0x402F6A7A, 0x4031475C, 0x4032D97C,
|
||||
0x40346B9C, 0x4035FDBB, 0x40378FDB, 0x403921FB, 0x403AB41B, 0x403C463A,
|
||||
0x403DD85A, 0x403F6A7A, 0x40407E4C, 0x4041475C, 0x4042106C, 0x4042D97C,
|
||||
0x4043A28C, 0x40446B9C, 0x404534AC, 0x4045FDBB, 0x4046C6CB, 0x40478FDB,
|
||||
0x404858EB, 0x404921FB,
|
||||
static const int npio2_hw[] = {
|
||||
0x3FF921FB, 0x400921FB, 0x4012D97C, 0x401921FB, 0x401F6A7A, 0x4022D97C, 0x4025FDBB, 0x402921FB,
|
||||
0x402C463A, 0x402F6A7A, 0x4031475C, 0x4032D97C, 0x40346B9C, 0x4035FDBB, 0x40378FDB, 0x403921FB,
|
||||
0x403AB41B, 0x403C463A, 0x403DD85A, 0x403F6A7A, 0x40407E4C, 0x4041475C, 0x4042106C, 0x4042D97C,
|
||||
0x4043A28C, 0x40446B9C, 0x404534AC, 0x4045FDBB, 0x4046C6CB, 0x40478FDB, 0x404858EB, 0x404921FB,
|
||||
};
|
||||
|
||||
/*
|
||||
@@ -630,12 +617,12 @@ __ieee754_rem_pio2 (double x, double *y)
|
||||
* sin(x) = x + (S1*x + (x *(r-y/2)+y))
|
||||
*/
|
||||
|
||||
#define S1 -1.66666666666666324348e-01 /* 0xBFC55555, 0x55555549 */
|
||||
#define S2 8.33333333332248946124e-03 /* 0x3F811111, 0x1110F8A6 */
|
||||
#define S3 -1.98412698298579493134e-04 /* 0xBF2A01A0, 0x19C161D5 */
|
||||
#define S4 2.75573137070700676789e-06 /* 0x3EC71DE3, 0x57B1FE7D */
|
||||
#define S5 -2.50507602534068634195e-08 /* 0xBE5AE5E6, 0x8A2B9CEB */
|
||||
#define S6 1.58969099521155010221e-10 /* 0x3DE5D93A, 0x5ACFD57C */
|
||||
#define S1 -1.66666666666666324348e-01 /* 0xBFC55555, 0x55555549 */
|
||||
#define S2 8.33333333332248946124e-03 /* 0x3F811111, 0x1110F8A6 */
|
||||
#define S3 -1.98412698298579493134e-04 /* 0xBF2A01A0, 0x19C161D5 */
|
||||
#define S4 2.75573137070700676789e-06 /* 0x3EC71DE3, 0x57B1FE7D */
|
||||
#define S5 -2.50507602534068634195e-08 /* 0xBE5AE5E6, 0x8A2B9CEB */
|
||||
#define S6 1.58969099521155010221e-10 /* 0x3DE5D93A, 0x5ACFD57C */
|
||||
|
||||
static double
|
||||
__kernel_sin (double x, double y, int iy)
|
||||
@@ -699,12 +686,12 @@ __kernel_sin (double x, double y, int iy)
|
||||
* thus, reducing the rounding error in the subtraction.
|
||||
*/
|
||||
|
||||
#define C1 4.16666666666666019037e-02 /* 0x3FA55555, 0x5555554C */
|
||||
#define C2 -1.38888888888741095749e-03 /* 0xBF56C16C, 0x16C15177 */
|
||||
#define C3 2.48015872894767294178e-05 /* 0x3EFA01A0, 0x19CB1590 */
|
||||
#define C4 -2.75573143513906633035e-07 /* 0xBE927E4F, 0x809C52AD */
|
||||
#define C5 2.08757232129817482790e-09 /* 0x3E21EE9E, 0xBDB4B1C4 */
|
||||
#define C6 -1.13596475577881948265e-11 /* 0xBDA8FAE9, 0xBE8838D4 */
|
||||
#define C1 4.16666666666666019037e-02 /* 0x3FA55555, 0x5555554C */
|
||||
#define C2 -1.38888888888741095749e-03 /* 0xBF56C16C, 0x16C15177 */
|
||||
#define C3 2.48015872894767294178e-05 /* 0x3EFA01A0, 0x19CB1590 */
|
||||
#define C4 -2.75573143513906633035e-07 /* 0xBE927E4F, 0x809C52AD */
|
||||
#define C5 2.08757232129817482790e-09 /* 0x3E21EE9E, 0xBDB4B1C4 */
|
||||
#define C6 -1.13596475577881948265e-11 /* 0xBDA8FAE9, 0xBE8838D4 */
|
||||
|
||||
static double
|
||||
__kernel_cos (double x, double y)
|
||||
@@ -777,21 +764,21 @@ __kernel_cos (double x, double y)
|
||||
* = 1 - 2*(tan(y) - (tan(y)^2)/(1+tan(y)))
|
||||
*/
|
||||
|
||||
#define T0 3.33333333333334091986e-01 /* 3FD55555, 55555563 */
|
||||
#define T1 1.33333333333201242699e-01 /* 3FC11111, 1110FE7A */
|
||||
#define T2 5.39682539762260521377e-02 /* 3FABA1BA, 1BB341FE */
|
||||
#define T3 2.18694882948595424599e-02 /* 3F9664F4, 8406D637 */
|
||||
#define T4 8.86323982359930005737e-03 /* 3F8226E3, E96E8493 */
|
||||
#define T5 3.59207910759131235356e-03 /* 3F6D6D22, C9560328 */
|
||||
#define T6 1.45620945432529025516e-03 /* 3F57DBC8, FEE08315 */
|
||||
#define T7 5.88041240820264096874e-04 /* 3F4344D8, F2F26501 */
|
||||
#define T8 2.46463134818469906812e-04 /* 3F3026F7, 1A8D1068 */
|
||||
#define T9 7.81794442939557092300e-05 /* 3F147E88, A03792A6 */
|
||||
#define T10 7.14072491382608190305e-05 /* 3F12B80F, 32F0A7E9 */
|
||||
#define T0 3.33333333333334091986e-01 /* 3FD55555, 55555563 */
|
||||
#define T1 1.33333333333201242699e-01 /* 3FC11111, 1110FE7A */
|
||||
#define T2 5.39682539762260521377e-02 /* 3FABA1BA, 1BB341FE */
|
||||
#define T3 2.18694882948595424599e-02 /* 3F9664F4, 8406D637 */
|
||||
#define T4 8.86323982359930005737e-03 /* 3F8226E3, E96E8493 */
|
||||
#define T5 3.59207910759131235356e-03 /* 3F6D6D22, C9560328 */
|
||||
#define T6 1.45620945432529025516e-03 /* 3F57DBC8, FEE08315 */
|
||||
#define T7 5.88041240820264096874e-04 /* 3F4344D8, F2F26501 */
|
||||
#define T8 2.46463134818469906812e-04 /* 3F3026F7, 1A8D1068 */
|
||||
#define T9 7.81794442939557092300e-05 /* 3F147E88, A03792A6 */
|
||||
#define T10 7.14072491382608190305e-05 /* 3F12B80F, 32F0A7E9 */
|
||||
#define T11 -1.85586374855275456654e-05 /* BEF375CB, DB605373 */
|
||||
#define T12 2.59073051863633712884e-05 /* 3EFB2A70, 74BF7AD4 */
|
||||
#define pio4 7.85398163397448278999e-01 /* 3FE921FB, 54442D18 */
|
||||
#define pio4lo 3.06161699786838301793e-17 /* 3C81A626, 33145C07 */
|
||||
#define T12 2.59073051863633712884e-05 /* 3EFB2A70, 74BF7AD4 */
|
||||
#define pio4 7.85398163397448278999e-01 /* 3FE921FB, 54442D18 */
|
||||
#define pio4lo 3.06161699786838301793e-17 /* 3C81A626, 33145C07 */
|
||||
|
||||
static double
|
||||
__kernel_tan (double x, double y, int iy)
|
||||
|
||||
Reference in New Issue
Block a user