Lines Matching +full:high +full:- +full:accuracy

1 /*-
29 * note that sinpi(-x) = -sinpi(x), so the algorithm considers only |x| and
34 * threshold is |x| < 0x1pN with N = -(P/2+M). P is the precision of the
35 * floating-point type and M = 2 to 4. To achieve high accuracy, pi is
36 * decomposed into high and low parts with the high part containing a
37 * number of trailing zero bits. x is also split into high and low parts.
43 * 3. For 1 <= |x| < 0x1p(P-1), argument reduction is required where
51 * = +-sinpi(r)
53 * If j0 is even, then cos(pi*j0) = 1. If j0 is odd, then cos(pi*j0) = -1.
56 * 4. For |x| >= 0x1p(P-1), |x| is integral and sinpi(x) = copysign(0,x).
60 * sinpi(+-0) = +-0
61 * sinpi(+-n) = +-0, for positive integers n.
62 * sinpi(+-inf) = nan. Raises the "invalid" floating-point exception.
63 * sinpi(nan) = nan. Raises the "invalid" floating-point exception.
72 pi_lo =-2.7818135228334233e-08; /* 0xbe5dde97 0x3dcb3b3a */
91 if (ix < 0x3e200000) { /* |x| < 0x1p-29 */ in sinpi()
101 lo = x * 0x1p53 - hi; in sinpi()
104 return (s * 0x1p-53); in sinpi()
108 return ((hx & 0x80000000) ? -s : s); in sinpi()
112 s = __kernel_cospi(0.5 - ax); in sinpi()
114 s = __kernel_cospi(ax - 0.5); in sinpi()
116 s = __kernel_sinpi(1 - ax); in sinpi()
117 return ((hx & 0x80000000) ? -s : s); in sinpi()
122 ax -= x; in sinpi()
132 s = __kernel_cospi(0.5 - ax); in sinpi()
135 s = __kernel_cospi(ax - 0.5); in sinpi()
137 s = __kernel_sinpi(1 - ax); in sinpi()
141 x -= 0x1p30; in sinpi()
143 if (j0 & 1) s = -s; in sinpi()
146 return ((hx & 0x80000000) ? -s : s); in sinpi()
149 /* x = +-inf or nan. */ in sinpi()
154 * |x| >= 0x1p52 is always an integer, so return +-0. in sinpi()