• Home
  • Raw
  • Download

Lines Matching refs:exp

38 	int exp, pwr;  in eexp2()  local
42 exp = ((s >> 23) & 0xff) - 127; in eexp2()
43 if (exp > 7) { in eexp2()
45 if (exp == 128 && (s & 0x7fffff) != 0) in eexp2()
50 if (exp < -23) in eexp2()
55 if (exp > 0) in eexp2()
56 pwr <<= exp; in eexp2()
58 pwr >>= -exp; in eexp2()
63 exp = (pwr >> 23) + 126; in eexp2()
64 if (exp >= 254) in eexp2()
66 if (exp < -23) in eexp2()
78 if (exp >= 0) in eexp2()
79 return mant + (exp << 23); in eexp2()
82 exp = -exp; in eexp2()
83 mant += 1 << (exp - 1); in eexp2()
84 return mant >> exp; in eexp2()
93 int exp, mant, lz, frac; in elog2() local
95 exp = s & 0x7f800000; in elog2()
97 if (exp == 0x7f800000) { /* Inf or NaN */ in elog2()
102 if ((exp | mant) == 0) /* +0 or -0 */ in elog2()
105 if (exp == 0) { in elog2()
109 exp = (-118 - lz) << 23; in elog2()
112 exp -= 127 << 23; in elog2()
116 exp |= 0x400000; /* 0.5 * 2^23 */ in elog2()
121 exp |= 0x200000; /* 0.25 * 2^23 */ in elog2()
126 exp |= 0x100000; /* 0.125 * 2^23 */ in elog2()
135 exp += frac; in elog2()
137 s = exp & 0x80000000; in elog2()
138 if (exp != 0) { in elog2()
140 exp = -exp; in elog2()
141 asm("cntlzw %0,%1" : "=r" (lz) : "r" (exp)); in elog2()
144 exp >>= lz; in elog2()
146 exp <<= -lz; in elog2()
147 s += ((lz + 126) << 23) + exp; in elog2()
156 int exp, mant; in ctsxs() local
158 exp = (x >> 23) & 0xff; in ctsxs()
160 if (exp == 255 && mant != 0) in ctsxs()
162 exp = exp - 127 + scale; in ctsxs()
163 if (exp < 0) in ctsxs()
165 if (exp >= 31) { in ctsxs()
172 mant = (mant << 7) >> (30 - exp); in ctsxs()
178 int exp; in ctuxs() local
181 exp = (x >> 23) & 0xff; in ctuxs()
183 if (exp == 255 && mant != 0) in ctuxs()
185 exp = exp - 127 + scale; in ctuxs()
186 if (exp < 0) in ctuxs()
193 if (exp >= 32) { in ctuxs()
199 mant = (mant << 8) >> (31 - exp); in ctuxs()
206 int exp; in rfiz() local
208 exp = ((x >> 23) & 0xff) - 127; in rfiz()
209 if (exp == 128 && (x & 0x7fffff) != 0) in rfiz()
211 if (exp >= 23) in rfiz()
213 if (exp < 0) in rfiz()
215 return x & ~(0x7fffff >> exp); in rfiz()
221 int exp, mask; in rfii() local
223 exp = ((x >> 23) & 0xff) - 127; in rfii()
224 if (exp == 128 && (x & 0x7fffff) != 0) in rfii()
226 if (exp >= 23) in rfii()
230 if (exp < 0) in rfii()
233 mask = 0x7fffff >> exp; in rfii()
242 int exp, half; in rfin() local
244 exp = ((x >> 23) & 0xff) - 127; in rfin()
245 if (exp == 128 && (x & 0x7fffff) != 0) in rfin()
247 if (exp >= 23) in rfin()
249 if (exp < -1) in rfin()
251 if (exp == -1) in rfin()
254 half = 0x400000 >> exp; in rfin()
256 return (x + half) & ~(0x7fffff >> exp); in rfin()