• Home
  • Raw
  • Download

Lines Matching refs:X

8 |	Input: Double-extended number X in location pointed to
11 | Output: The value tanh(X) returned in floating-point register Fp0.
23 | 1. If |X| >= (5/2) log2 or |X| <= 2**(-40), go to 3.
25 | 2. (2**(-40) < |X| < (5/2) log2) Calculate tanh(X) by
26 | sgn := sign(X), y := 2|X|, z := expm1(Y), and
27 | tanh(X) = sgn*( z/(2+z) ).
30 | 3. (|X| <= 2**(-40) or |X| >= (5/2) log2). If |X| < 1,
33 | 4. (|X| >= (5/2) log2) If |X| >= 50 log2, go to 6.
35 | 5. ((5/2) log2 <= |X| < 50 log2) Calculate tanh(X) by
36 | sgn := sign(X), y := 2|X|, z := exp(Y),
37 | tanh(X) = sgn - [ sgn*2/(1+z) ].
40 | 6. (|X| >= 50 log2) Tanh(X) = +-1 (round to nearest). Thus, we
41 | calculate Tanh(X) by
42 | sgn := sign(X), Tiny := 2**(-126),
43 | tanh(X) := sgn - sgn*Tiny.
46 | 7. (|X| < 2**(-40)). Tanh(X) = X. Exit.
61 .set X,FP_SCR5 define
62 .set XDCARE,X+2
63 .set XFRAC,X+4
78 |--TANH(X) = X FOR DENORMALIZED X
86 fmovex %fp0,X(%a6)
89 movel %d0,X(%a6)
91 cmp2l BOUNDS1(%pc),%d0 | ...2**(-40) < |X| < (5/2)LOG2 ?
95 |--Y = 2|X|, Z = EXPM1(Y), TANH(X) = SIGN(X) * Z / (Z+2).
97 movel X(%a6),%d0
100 addl #0x00010000,%d0 | ...EXPONENT OF 2|X|
101 movel %d0,X(%a6)
103 fmovex X(%a6),%fp0 | ...FP0 IS Y = 2|X|
128 |-- (5/2) LOG2 < |X| < 50 LOG2,
129 |--TANH(X) = 1 - (2/[EXP(2X)+1]). LET Y = 2|X|, SGN = SIGN(X),
130 |--TANH(X) = SGN - SGN*2/[EXP(Y)+1].
132 movel X(%a6),%d0
135 addl #0x00010000,%d0 | ...EXPO OF 2|X|
136 movel %d0,X(%a6) | ...Y = 2|X|
139 fmovex X(%a6),%fp0 | ...Y = 2|X|
149 eorl #0xC0000000,%d0 | ...-SIGN(X)*2
150 fmoves %d0,%fp1 | ...-SIGN(X)*2 IN SGL FMT
151 fdivx %fp0,%fp1 | ...-SIGN(X)2 / [EXP(Y)+1 ]
166 fmovex X(%a6),%fp0 |last inst - possible exception set
171 |---RETURN SGN(X) - SGN(X)EPS
172 movel X(%a6),%d0
177 eorl #0x80800000,%d0 | ...-SIGN(X)*EPS