• Home
  • Raw
  • Download

Lines Matching refs:X

6 |	number.	setoxm1 computes exp(X)-1, and setoxm1d computes
7 | exp(X)-1 for denormalized X.
16 | exp(X) or exp(X)-1 returned in floating-point register fp0.
34 | argument X whose magnitude is less than 16380 log2, which
40 | argument X, 0.25 <= |X| < 70log2. For |X| < 0.25, it takes
52 | Step 2. Return ans := ans + sign(X)*2^(-126). Exit.
60 | 1.1 If |X| >= 2^(-65), go to Step 1.3.
62 | 1.3 If |X| < 16380 log(2), go to Step 2.
66 | compact representation of |X| is used. This format is a
68 | the sign and biased exponent field of |X|; the lower 16
70 | explicit bit) bits of |X|. Consequently, the comparisons
74 | to Step 2 guarantees |X| < 16380 log(2). There is no harm
75 | to have a small number of cases where |X| is less than,
79 | Step 2. Calculate N = round-to-nearest-int( X * 64/log2 ).
81 | 2.2 N := round-to-nearest-integer( X * 64/log2 ).
88 | Z := X * constant
99 | Z = X*(64/log2)*(1+eps), |eps| <= 2^(-24).
103 | Step 3. Calculate X - N*log2/64.
104 | 3.1 R := X + N*L1, where L1 := single-precision(-log2/64).
110 | c) The calculation X+N*L1 is also exact due to cancellation.
111 | Thus, R is practically X+N(L1+L2) to full 64 bits.
115 | N = rnd-to-int( X*64/log2 (1+eps) ), |eps|<=2^(-24)
116 | X*64/log2 (1+eps) = N + f, |f| <= 0.5
117 | X*64/log2 - N = f - eps*X 64/log2
118 | X - N*log2/64 = f*log2/64 - eps*X
121 | Now |X| <= 16446 log2, thus
123 | |X - N*log2/64| <= (0.5 + 16446/2^(18))*log2/64
152 | Step 6. Reconstruction of exp(X)
153 | exp(X) = 2^M * 2^(J/64) * exp(R).
158 | Notes: If AdjFlag = 0, we have X = Mlog2 + Jlog2/64 + R,
159 | |M| <= 16380, and Scale = 2^M. Moreover, exp(X) will
162 | X = (M1+M)log2 + Jlog2/64 + R, |M1+M| >= 16380.
163 | Hence, exp(X) may overflow or underflow or neither.
172 | Step 7. Return 1 + X.
173 | 7.1 ans := X
176 | Notes: For non-zero X, the inexact exception will always be
178 | Note also that we use the FMOVEM instruction to move X
180 | the FMOVEM may not seem relevant since X is normalized,
185 | Step 8. Handle exp(X) where |X| >= 16380log2.
186 | 8.1 If |X| > 16480 log2, go to Step 9.
188 | 8.2 N := round-to-integer( X * 64/log2 )
196 | Step 9. Handle exp(X), |X| > 16480 log2.
197 | 9.1 If X < 0, go to 9.3
202 | Notes: Exp(X) will surely overflow or underflow, depending on
203 | X's sign. "Huge" and "Tiny" are respectively large/tiny
465 movel (%a0),%d0 | ...load part of input X
466 andil #0x7FFF0000,%d0 | ...biased expo. of X
472 |--The case |X| >= 2^(-65)
473 movew 4(%a0),%d0 | ...expo. and partial sig. of |X|
480 |--This is the normal branch: 2^(-65) <= |X| < 16380 log2.
484 fmuls #0x42B8AA3B,%fp0 | ...64/log2 * X
487 fmovel %fp0,%d0 | ...N = int( X * 64/log2 )
502 |--fp1,fp2 saved on the stack. fp0 is N, fp1 is X,
507 faddx %fp1,%fp0 | ...X + N*L1
551 |--EXP(X) = 2^M * ( 2^(J/64) + 2^(J/64)*(EXP(R)-1) )
572 fmovemx (%a0),%fp0-%fp0 | ...in case X is denormalized
574 fadds #0x3F800000,%fp0 | ...1+X in user mode
585 fmuls #0x42B8AA3B,%fp0 | ...64/log2 * X
588 fmovel %fp0,%d0 | ...N = int( X * 64/log2 )
620 |--entry point for EXPM1(X), here X is denormalized
627 |--entry point for EXPM1(X), here X is finite, non-zero, non-NaN
631 movel (%a0),%d0 | ...load part of input X
632 andil #0x7FFF0000,%d0 | ...biased expo. of X
634 bges EM1CON1 | ...|X| >= 1/4
639 |--The case |X| >= 1/4
640 movew 4(%a0),%d0 | ...expo. and partial sig. of |X|
642 bles EM1MAIN | ...1/4 <= |X| <= 70log2
647 |--This is the case: 1/4 <= |X| <= 70 log2.
651 fmuls #0x42B8AA3B,%fp0 | ...64/log2 * X
654 fmovel %fp0,%d0 | ...N = int( X * 64/log2 )
668 |--fp1,fp2 saved on the stack. fp0 is N, fp1 is X,
673 faddx %fp1,%fp0 | ...X + N*L1
767 |--Step 7 |X| < 1/4.
772 |--Step 8 |X| < 2^(-65)
799 |--Step 9 exp(X)-1 by a simple polynomial
800 fmovex (%a0),%fp0 | ...fp0 is X
801 fmulx %fp0,%fp0 | ...fp0 is S := X*X
836 fmulx (%a0),%fp1 | ...fp1 is X*S*(B2...
853 |--Step 10 |X| > 70 log2