Lines Matching defs:exp16

220 	int			exp16;		/* exp16: biased exponent for 16-bit floats */
229 exp16 = (int) (exp32) - 127 + 15; /* 15/127: exponent bias for 16-bit/32-bit floats */
256 * * If exp16 is less than 0, we are experiencing underflow for the exponent. To encode this underflowed exponent,
258 * The real exponent is exp16 - 15. A denormalized 16-bit float can represent -14 via its exponent.
260 * So, we just need to right shift the mantissa -exp16 bits.
261 * * If exp16 is 0, mantissa shifting requirement is similar to the above.
262 * * If exp16 is greater than 30 (0b11110), we are experiencing overflow for the exponent of 16-bit normalized floats.
265 else if (exp16 < -10)
272 else if (exp16 <= 0)
278 * We also need to shift right -exp16 bits to encode the underflowed exponent.
282 mantissa >>= (14 - exp16);
289 mantissa = roundToNearestEven(mantissa, 14 - exp16);
294 else if (exp16 <= 30)
298 return (deFloat16) (sign | ((deUint32)exp16 << 10u) | (mantissa >> 13u));
303 /* Handle overflow. exp16 may overflow (and become Inf) itself, but that's correct. */
304 exp16 = (exp16 << 10u) + (mantissa & (1 << 10));
306 return (deFloat16) (sign | ((deUint32) exp16) | mantissa);
377 int exp16; /* exp16: biased exponent for 16-bit floats */
386 exp16 = (int) (exp64) - 1023 + 15; /* 15/127: exponent bias for 16-bit/32-bit floats */
413 * * If exp16 is less than 0, we are experiencing underflow for the exponent. To encode this underflowed exponent,
415 * The real exponent is exp16 - 15. A denormalized 16-bit float can represent -14 via its exponent.
417 * So, we just need to right shift the mantissa -exp16 bits.
418 * * If exp16 is 0, mantissa shifting requirement is similar to the above.
419 * * If exp16 is greater than 30 (0b11110), we are experiencing overflow for the exponent of 16-bit normalized floats.
422 else if (exp16 < -10)
429 else if (exp16 <= 0)
435 * We also need to shift right -exp16 bits to encode the underflowed exponent.
439 mantissa >>= (43 - exp16);
446 mantissa = roundToNearestEven64(mantissa, 43 - exp16);
451 else if (exp16 <= 30)
455 return (deFloat16) (sign | ((deUint32)exp16 << 10u) | (mantissa >> 42u));
460 /* Handle overflow. exp16 may overflow (and become Inf) itself, but that's correct. */
461 exp16 = (exp16 << 10u) + (deFloat16)(mantissa & (1 << 10));
463 return (deFloat16) (sign | ((deUint32) exp16) | mantissa);