Lines Matching full:exponent
34 * S - sign bit, E - bits of the biased exponent, M - bits of the mantissa, 0 - zero bits. in fp16_ieee_to_fp32_bits()
47 * Extract mantissa and biased exponent of the input number into the bits 0-30 of the 32-bit word: in fp16_ieee_to_fp32_bits()
57 …* If the initial number is normalized, some of its high 6 bits (sign == 0 and 5-bit exponent) equa… in fp16_ieee_to_fp32_bits()
59 …* denormalized nonsign by renorm_shift, the unit bit of mantissa will shift into exponent, turning… in fp16_ieee_to_fp32_bits()
60 * biased exponent into 1, and making mantissa normalized (i.e. without leading 1). in fp16_ieee_to_fp32_bits()
71 * Iff half-precision number has exponent of 15, the addition overflows it into bit 31, in fp16_ieee_to_fp32_bits()
74 …* 0x7F800000 if the half-precision number had exponent of 15 (i.e. was NaN or in… in fp16_ieee_to_fp32_bits()
88 …* 2. Shift nonsign right by 3 so the exponent (5 bits originally) becomes an 8-bit field and 10-bi… in fp16_ieee_to_fp32_bits()
90 * 3. Add 0x70 to the exponent (starting at bit 23) to compensate the different in exponent bias in fp16_ieee_to_fp32_bits()
92 …* 4. Subtract renorm_shift from the exponent (starting at bit 23) to account for renormalization. … in fp16_ieee_to_fp32_bits()
94 * 5. Binary OR with inf_nan_mask to turn the exponent into 0xFF if the input was NaN or infinity. in fp16_ieee_to_fp32_bits()
95 …* 6. Binary ANDNOT with zero_mask to turn the mantissa and exponent into zero if the input was zer… in fp16_ieee_to_fp32_bits()
116 * S - sign bit, E - bits of the biased exponent, M - bits of the mantissa, 0 - zero bits. in fp16_ieee_to_fp32_value()
129 * Extract mantissa and biased exponent of the input number into the high bits of the 32-bit word: in fp16_ieee_to_fp32_value()
139 * Shift mantissa and exponent into bits 23-28 and bits 13-22 so they become mantissa and exponent in fp16_ieee_to_fp32_value()
142 * S|Exponent | Mantissa in fp16_ieee_to_fp32_value()
148 * Next, there are some adjustments to the exponent: in fp16_ieee_to_fp32_value()
149 …* - The exponent needs to be corrected by the difference in exponent bias between single-precision… in fp16_ieee_to_fp32_value()
152 …* Therefore, if the biased exponent of the half-precision input was 0x1F (max possible value), t… in fp16_ieee_to_fp32_value()
154 …* - First, we adjust the exponent by (0xFF - 0x1F) = 0xE0 (see exp_offset below) rather than by … in fp16_ieee_to_fp32_value()
155 * by the difference in the exponent bias (see above). in fp16_ieee_to_fp32_value()
156 …* - Then we multiply the single-precision result of exponent adjustment by 2**(-112) to reverse … in fp16_ieee_to_fp32_value()
157 …* exponent adjustment by 0xE0 less the necessary exponent adjustment by 0x70 due to difference… in fp16_ieee_to_fp32_value()
161 …* Note that the above operations do not handle denormal inputs (where biased exponent == 0). Howev… in fp16_ieee_to_fp32_value()
176 * In a denormalized number the biased exponent is zero, and mantissa has on-zero bits. in fp16_ieee_to_fp32_value()
188 * and with an exponent which would scale the corresponding mantissa bits to 2**(-24). in fp16_ieee_to_fp32_value()
190 * FP32 = (1 + mantissa * 2**(-23)) * 2**(exponent - 127) in fp16_ieee_to_fp32_value()
191 …* Therefore, when the biased exponent is 126, a unit change in the mantissa of the input denormali… in fp16_ieee_to_fp32_value()
206 …* input exponent. The variable two_w contains input exponent in bits 27-31, therefore if its sma… in fp16_ieee_to_fp32_value()
208 * - Combine the result of conversion of exponent and mantissa with the sign of the input number. in fp16_ieee_to_fp32_value()
263 * S - sign bit, E - bits of the biased exponent, M - bits of the mantissa, 0 - zero bits. in fp16_alt_to_fp32_bits()
276 * Extract mantissa and biased exponent of the input number into the bits 0-30 of the 32-bit word: in fp16_alt_to_fp32_bits()
286 …* If the initial number is normalized, some of its high 6 bits (sign == 0 and 5-bit exponent) equa… in fp16_alt_to_fp32_bits()
288 …* denormalized nonsign by renorm_shift, the unit bit of mantissa will shift into exponent, turning… in fp16_alt_to_fp32_bits()
289 * biased exponent into 1, and making mantissa normalized (i.e. without leading 1). in fp16_alt_to_fp32_bits()
309 …* 2. Shift nonsign right by 3 so the exponent (5 bits originally) becomes an 8-bit field and 10-bi… in fp16_alt_to_fp32_bits()
311 * 3. Add 0x70 to the exponent (starting at bit 23) to compensate the different in exponent bias in fp16_alt_to_fp32_bits()
313 …* 4. Subtract renorm_shift from the exponent (starting at bit 23) to account for renormalization. … in fp16_alt_to_fp32_bits()
315 …* 5. Binary ANDNOT with zero_mask to turn the mantissa and exponent into zero if the input was zer… in fp16_alt_to_fp32_bits()
336 * S - sign bit, E - bits of the biased exponent, M - bits of the mantissa, 0 - zero bits. in fp16_alt_to_fp32_value()
349 * Extract mantissa and biased exponent of the input number into the high bits of the 32-bit word: in fp16_alt_to_fp32_value()
359 * Shift mantissa and exponent into bits 23-28 and bits 13-22 so they become mantissa and exponent in fp16_alt_to_fp32_value()
362 * S|Exponent | Mantissa in fp16_alt_to_fp32_value()
368 …* Next, the exponent is adjusted for the difference in exponent bias between single-precision and … in fp16_alt_to_fp32_value()
370 …* half-precision exponent is 0x1F and after the adjustment is can not exceed 0x8F < 0xFE (largest … in fp16_alt_to_fp32_value()
371 * exponent for non-finite values). in fp16_alt_to_fp32_value()
373 …* Note that this operation does not handle denormal inputs (where biased exponent == 0). However, … in fp16_alt_to_fp32_value()
383 * In a denormalized number the biased exponent is zero, and mantissa has on-zero bits. in fp16_alt_to_fp32_value()
395 * and with an exponent which would scale the corresponding mantissa bits to 2**(-24). in fp16_alt_to_fp32_value()
397 * FP32 = (1 + mantissa * 2**(-23)) * 2**(exponent - 127) in fp16_alt_to_fp32_value()
398 …* Therefore, when the biased exponent is 126, a unit change in the mantissa of the input denormali… in fp16_alt_to_fp32_value()
413 …* input exponent. The variable two_w contains input exponent in bits 27-31, therefore if its sma… in fp16_alt_to_fp32_value()
415 * - Combine the result of conversion of exponent and mantissa with the sign of the input number. in fp16_alt_to_fp32_value()