Lines Matching refs:exponent
65 int exponent = ((f32.ui >> 23) & 0xff) - 127; in f32_to_uf11() local
68 if (exponent == 128) { /* Infinity or NaN */ in f32_to_uf11()
92 } else if (exponent > -15) { /* Representable value */ in f32_to_uf11()
93 exponent += UF11_EXPONENT_BIAS; in f32_to_uf11()
95 uf11 = exponent << UF11_EXPONENT_SHIFT | mantissa; in f32_to_uf11()
108 int exponent = (val & 0x07c0) >> UF11_EXPONENT_SHIFT; in uf11_to_f32() local
113 if (exponent == 0) { in uf11_to_f32()
118 } else if (exponent == 31) { in uf11_to_f32()
122 exponent -= 15; in uf11_to_f32()
123 if (exponent < 0) { in uf11_to_f32()
124 scale = 1.0f / (1 << -exponent); in uf11_to_f32()
126 scale = (float) (1 << exponent); in uf11_to_f32()
147 int exponent = ((f32.ui >> 23) & 0xff) - 127; in f32_to_uf10() local
150 if (exponent == 128) { in f32_to_uf10()
174 } else if (exponent > -15) { /* Representable value */ in f32_to_uf10()
175 exponent += UF10_EXPONENT_BIAS; in f32_to_uf10()
177 uf10 = exponent << UF10_EXPONENT_SHIFT | mantissa; in f32_to_uf10()
190 int exponent = (val & 0x03e0) >> UF10_EXPONENT_SHIFT; in uf10_to_f32() local
195 if (exponent == 0) { in uf10_to_f32()
200 } else if (exponent == 31) { in uf10_to_f32()
204 exponent -= 15; in uf10_to_f32()
205 if (exponent < 0) { in uf10_to_f32()
206 scale = 1.0f / (1 << -exponent); in uf10_to_f32()
209 scale = (float) (1 << exponent); in uf10_to_f32()