61 * 101 (z+1-y)/4 -cospi(t) -sinpi(t) 1/tanpi(t)
62 * 110 (y-z)/4 -cospi(t) sinpi(t) -1/tanpi(t)
63 * 111 (z+1-y)/4 -sinpi(t) cospi(t) -tanpi(t)
64 * ---------------------------------------------------
65 *
66 * NOTE. This program compute sinpi/cospi(t<0.25) by __k_sin/cos(pi*t, 0.0).
67 * This will return a result with error slightly more than one ulp (but less
68 * than 2 ulp). If one wants accurate result, one may break up pi*t in
69 * high (tpi_h) and low (tpi_l) parts and call __k_sin/cos(tip_h, tip_lo)
70 * instead.
71 */
72
73 #include "libm.h"
74 #include "libm_synonyms.h"
75 #include "longdouble.h"
76
77 #include <sys/isa_defs.h>
78
79 #define I(q, m) ((int *) &(q))[m]
80 #define U(q, m) ((unsigned *) &(q))[m]
81 #if defined(_LITTLE_ENDIAN)
82 #define LDBL_MOST_SIGNIF_I(ld) ((I(ld, 2) << 16) | (0xffff & (I(ld, 1) >> 15)))
83 #define LDBL_LEAST_SIGNIF_U(ld) U(ld, 0)
84 #define PREC 64
85 #define PRECM1 63
86 #define PRECM2 62
87 static const long double twoPRECM2 = 9.223372036854775808000000000000000e+18L;
88 #else
89 #define LDBL_MOST_SIGNIF_I(ld) I(ld, 0)
90 #define LDBL_LEAST_SIGNIF_U(ld) U(ld, sizeof(long double) / sizeof(int) - 1)
91 #define PREC 113
92 #define PRECM1 112
93 #define PRECM2 111
94 static const long double twoPRECM2 = 5.192296858534827628530496329220096e+33L;
95 #endif
96
97 static const long double
98 zero = 0.0L,
99 quater = 0.25L,
100 one = 1.0L,
101 pi = 3.141592653589793238462643383279502884197e+0000L,
|
61 * 101 (z+1-y)/4 -cospi(t) -sinpi(t) 1/tanpi(t)
62 * 110 (y-z)/4 -cospi(t) sinpi(t) -1/tanpi(t)
63 * 111 (z+1-y)/4 -sinpi(t) cospi(t) -tanpi(t)
64 * ---------------------------------------------------
65 *
66 * NOTE. This program compute sinpi/cospi(t<0.25) by __k_sin/cos(pi*t, 0.0).
67 * This will return a result with error slightly more than one ulp (but less
68 * than 2 ulp). If one wants accurate result, one may break up pi*t in
69 * high (tpi_h) and low (tpi_l) parts and call __k_sin/cos(tip_h, tip_lo)
70 * instead.
71 */
72
73 #include "libm.h"
74 #include "libm_synonyms.h"
75 #include "longdouble.h"
76
77 #include <sys/isa_defs.h>
78
79 #define I(q, m) ((int *) &(q))[m]
80 #define U(q, m) ((unsigned *) &(q))[m]
81 #if defined(__i386) || defined(__amd64)
82 #define LDBL_MOST_SIGNIF_I(ld) ((I(ld, 2) << 16) | (0xffff & (I(ld, 1) >> 15)))
83 #define LDBL_LEAST_SIGNIF_U(ld) U(ld, 0)
84 #define PREC 64
85 #define PRECM1 63
86 #define PRECM2 62
87 static const long double twoPRECM2 = 9.223372036854775808000000000000000e+18L;
88 #else
89 #define LDBL_MOST_SIGNIF_I(ld) I(ld, 0)
90 #define LDBL_LEAST_SIGNIF_U(ld) U(ld, sizeof(long double) / sizeof(int) - 1)
91 #define PREC 113
92 #define PRECM1 112
93 #define PRECM2 111
94 static const long double twoPRECM2 = 5.192296858534827628530496329220096e+33L;
95 #endif
96
97 static const long double
98 zero = 0.0L,
99 quater = 0.25L,
100 one = 1.0L,
101 pi = 3.141592653589793238462643383279502884197e+0000L,
|