Lines Matching defs:exp
41 int exp, pwr;
45 exp = ((s >> 23) & 0xff) - 127;
46 if (exp > 7) {
48 if (exp == 128 && (s & 0x7fffff) != 0)
53 if (exp < -23)
58 if (exp > 0)
59 pwr <<= exp;
61 pwr >>= -exp;
66 exp = (pwr >> 23) + 126;
67 if (exp >= 254)
69 if (exp < -23)
81 if (exp >= 0)
82 return mant + (exp << 23);
85 exp = -exp;
86 mant += 1 << (exp - 1);
87 return mant >> exp;
96 int exp, mant, lz, frac;
98 exp = s & 0x7f800000;
100 if (exp == 0x7f800000) { /* Inf or NaN */
105 if ((exp | mant) == 0) /* +0 or -0 */
108 if (exp == 0) {
112 exp = (-118 - lz) << 23;
115 exp -= 127 << 23;
119 exp |= 0x400000; /* 0.5 * 2^23 */
124 exp |= 0x200000; /* 0.25 * 2^23 */
129 exp |= 0x100000; /* 0.125 * 2^23 */
138 exp += frac;
140 s = exp & 0x80000000;
141 if (exp != 0) {
143 exp = -exp;
144 asm("cntlzw %0,%1" : "=r" (lz) : "r" (exp));
147 exp >>= lz;
149 exp <<= -lz;
150 s += ((lz + 126) << 23) + exp;
159 int exp, mant;
161 exp = (x >> 23) & 0xff;
163 if (exp == 255 && mant != 0)
165 exp = exp - 127 + scale;
166 if (exp < 0)
168 if (exp >= 31) {
175 mant = (mant << 7) >> (30 - exp);
181 int exp;
184 exp = (x >> 23) & 0xff;
186 if (exp == 255 && mant != 0)
188 exp = exp - 127 + scale;
189 if (exp < 0)
196 if (exp >= 32) {
202 mant = (mant << 8) >> (31 - exp);
209 int exp;
211 exp = ((x >> 23) & 0xff) - 127;
212 if (exp == 128 && (x & 0x7fffff) != 0)
214 if (exp >= 23)
216 if (exp < 0)
218 return x & ~(0x7fffff >> exp);
224 int exp, mask;
226 exp = ((x >> 23) & 0xff) - 127;
227 if (exp == 128 && (x & 0x7fffff) != 0)
229 if (exp >= 23)
233 if (exp < 0)
236 mask = 0x7fffff >> exp;
245 int exp, half;
247 exp = ((x >> 23) & 0xff) - 127;
248 if (exp == 128 && (x & 0x7fffff) != 0)
250 if (exp >= 23)
252 if (exp < -1)
254 if (exp == -1)
257 half = 0x400000 >> exp;
259 return (x + half) & ~(0x7fffff >> exp);