21 Xsig * accum_result,
long int *expon);
28 long int exponent, expon, expon_expon;
29 Xsig accumulator, expon_accum, yaccum;
37 if (st0_ptr->
sigh > (
unsigned)0xb504f334) {
54 accumulator.
msw = accumulator.
midw = accumulator.
lsw = 0;
56 log2_kernel(&x, argsign, &accumulator, &expon);
65 expon_accum.
midw = expon_accum.
lsw = 0;
67 expon_expon = 31 +
norm_Xsig(&expon_accum);
68 shr_Xsig(&accumulator, expon_expon - expon);
71 negate_Xsig(&accumulator);
72 add_Xsig_Xsig(&accumulator, &expon_accum);
84 if (accumulator.
msw == 0) {
110 Xsig accumulator, yaccum;
113 log2_kernel(st0_ptr, sign0, &accumulator, &exponent);
162 static const unsigned long long logterms[
HIPOWER] = {
163 0x2a8eca5705fc2ef0
LL,
164 0xf6384ee1d01febce
LL,
165 0x093bb62877cdf642
LL,
166 0x006985d8a9ec439b
LL,
167 0x0005212c4f55a9c8
LL,
168 0x00004326a16927f0
LL,
169 0x0000038d1d80a0e7
LL,
170 0x0000003141cc80c6
LL,
171 0x00000002b1668c9f
LL,
175 static const unsigned long leadterm = 0xb8000000;
185 unsigned long long Xsq;
186 Xsig accumulator, Numer, Denom, argSignif, arg_signif;
189 Numer.
lsw = Denom.
lsw = 0;
192 shr_Xsig(&Denom, 2 - (1 + exponent));
193 Denom.
msw |= 0x80000000;
194 div_Xsig(&Numer, &Denom, &argSignif);
196 shr_Xsig(&Denom, 1 - (1 + exponent));
198 if (Denom.
msw & 0x80000000) {
199 div_Xsig(&Numer, &Denom, &argSignif);
203 argSignif.
lsw = Numer.
lsw;
205 argSignif.
msw = Numer.
msw;
211 if (exponent >= -2) {
212 if ((exponent > -2) || (argSignif.
msw > (
unsigned)0xafb0ccc0)) {
218 arg_signif.
lsw = argSignif.
lsw;
221 accumulator.
lsw = argSignif.
lsw;
224 shr_Xsig(&accumulator, 2 * (-1 - (1 + exponent + adj)));
226 if (accumulator.
lsw & 0x80000000)
229 accumulator.
msw = accumulator.
midw = accumulator.
lsw = 0;
237 add_two_Xsig(&accumulator, &arg_signif, &exponent);
239 *expon = exponent + 1;
240 accum_result->
lsw = accumulator.
lsw;
241 accum_result->
midw = accumulator.
midw;
242 accum_result->
msw = accumulator.
msw;