22 static const unsigned long long oddnegterms[
HIPOWERon] = {
32 static const unsigned long long oddplterms[
HIPOWERop] = {
42 static const unsigned long long denomterm = 0xebd9b842c5c53a0e
LL;
44 static const Xsig fixedpterm =
MK_XSIG(0xaaaaaaaa, 0xaaaaaaaa, 0xaaaaaaaa);
46 static const Xsig pi_signif =
MK_XSIG(0xc90fdaa2, 0x2168c234, 0xc4c6628b);
54 u_char transformed, inverted, sign1, sign2;
57 Xsig accumulator, Numer, Denom, accumulatore, argSignif, argSq, argSqSq;
77 if ((exponent < 0) || ((exponent == 0) &&
80 (st0_ptr->
sigl < st1_ptr->
sigl))))) {
92 div_Xsig(&Numer, &Denom, &argSignif);
96 || ((exponent == -2) && (argSignif.
msw > 0xd413ccd0))) {
103 if (!((exponent == 0) &&
104 (argSignif.
lsw == 0) && (argSignif.
midw == 0) &&
105 (argSignif.
msw == 0x80000000))) {
120 Denom.
msw |= 0x80000000;
122 div_Xsig(&Numer, &Denom, &argSignif);
130 argSq.
lsw = argSignif.
lsw;
132 argSq.
msw = argSignif.
msw;
140 accumulatore.
lsw = argSq.
lsw;
143 shr_Xsig(&argSq, 2 * (-1 - exponent - 1));
144 shr_Xsig(&argSqSq, 4 * (-1 - exponent - 1));
150 accumulator.
msw = accumulator.
midw = accumulator.
lsw = 0;
154 negate_Xsig(&accumulator);
157 negate_Xsig(&accumulator);
158 add_two_Xsig(&accumulator, &fixedpterm, &dummy_exp);
161 shr_Xsig(&accumulatore, 1 + 2 * (-1 - exponent));
162 accumulatore.
msw |= 0x80000000;
164 div_Xsig(&accumulator, &accumulatore, &accumulator);
170 negate_Xsig(&accumulator);
171 add_Xsig_Xsig(&accumulator, &argSignif);
175 shr_Xsig(&accumulator, -1 - exponent);
176 negate_Xsig(&accumulator);
177 add_Xsig_Xsig(&accumulator, &pi_signif);
184 negate_Xsig(&accumulator);
185 add_Xsig_Xsig(&accumulator, &pi_signif);
191 shr_Xsig(&accumulator, 1 - exponent);
192 negate_Xsig(&accumulator);
193 add_Xsig_Xsig(&accumulator, &pi_signif);