24 static const unsigned long long pos_terms_l[
N_COEFF_P] = {
31 static const unsigned long long neg_terms_l[
N_COEFF_N] = {
40 static const unsigned long long pos_terms_h[
N_COEFF_PH] = {
47 static const unsigned long long neg_terms_h[
N_COEFF_NH] = {
60 Xsig accumulator, argSqrd, argTo4;
61 unsigned long fix_up, adj;
62 unsigned long long fixed_arg;
67 accumulator.
lsw = accumulator.
midw = accumulator.
msw = 0;
72 || ((exponent == -1) && (st0_ptr->
sigh <= 0xe21240aa))) {
79 shr_Xsig(&argSqrd, 2 * (-1 - exponent));
88 negate_Xsig(&accumulator);
94 accumulator.
msw |= 0x80000000;
106 negate_Xsig(&accumulator);
125 fixed_arg = 0x921fb54442d18469
LL - fixed_arg;
127 if (fixed_arg == 0xffffffffffffffffLL)
141 negate_Xsig(&accumulator);
145 negate_Xsig(&accumulator);
151 negate_Xsig(&accumulator);
153 add_Xsig_Xsig(&accumulator, &argSqrd);
157 accumulator.
lsw |= 1;
158 negate_Xsig(&accumulator);
168 if (argSqrd.
msw & 0xffc00000) {
170 fix_up -= mul_32_32(0x898cc517, argSqrd.
msw) / 6;
172 fix_up = mul_32_32(fix_up,
LL_MSW(fixed_arg));
174 adj = accumulator.
lsw;
175 accumulator.
lsw -= fix_up;
176 if (accumulator.
lsw > adj)
190 && (
significand(&result) > 0x8000000000000000LL)) {
204 Xsig accumulator, argSqrd, fix_up, argTo4;
205 unsigned long long fixed_arg;
210 && (
significand(st0_ptr) > 0xc90fdaa22168c234LL))) {
219 accumulator.
lsw = accumulator.
midw = accumulator.
msw = 0;
222 || ((exponent == -1) && (st0_ptr->
sigh <= 0xb00d6f54))) {
232 shr_Xsig(&argSqrd, 2 * (-1 - exponent));
243 negate_Xsig(&accumulator);
247 negate_Xsig(&accumulator);
251 shr_Xsig(&accumulator, -2 * (1 + exponent));
254 negate_Xsig(&accumulator);
256 add_Xsig_Xsig(&accumulator, &argSqrd);
262 negate_Xsig(&accumulator);
264 if (accumulator.
lsw & 0x80000000)
266 if (accumulator.
msw == 0) {
286 fixed_arg = 0x921fb54442d18469
LL - fixed_arg;
288 if (fixed_arg == 0xffffffffffffffffLL)
296 if (!(
LL_MSW(fixed_arg) & 0xffff0000)) {
308 shr_Xsig(&argSqrd, 2 * (-1 - exponent));
319 negate_Xsig(&accumulator);
325 accumulator.
msw |= 0x80000000;
335 shr_Xsig(&accumulator, exp2 - exponent);
337 negate_Xsig(&accumulator);
338 XSIG_LL(accumulator) += fixed_arg;
346 XSIG_LL(fix_up) = 0x898cc51701b839a2ll;
350 if (argSqrd.
msw & 0xffc00000) {
352 fix_up.
msw -= mul_32_32(0x898cc517, argSqrd.
msw) / 2;
353 fix_up.
msw += mul_32_32(0x898cc517, argTo4.
msw) / 24;
361 add_Xsig_Xsig(&accumulator, &fix_up);
373 && (
significand(&result) > 0x8000000000000000LL)) {