Lines Matching defs:FP32_MANT_BITS

84 #define FP32_MANT_BITS (FP32_BITS - FP32_EXP_BITS - 1)
88 #define FP32_EXP(x) ((x) >> FP32_MANT_BITS & ((1ULL << FP32_EXP_BITS) - 1))
92 #define FP32_MANT(x) ((x) & ((1ULL << FP32_MANT_BITS) - 1))
308 return sgn << (FP32_BITS - 1) | exp << FP32_MANT_BITS | FP32_MANT(mnt);
380 return fp32_pack(0, FP32_EXP_INF, 1ULL << (FP32_MANT_BITS - 1));
418 *mnt |= 1ULL << FP32_MANT_BITS;
475 return fp32_is_NaN(exp, mnt) && !(mnt >> (FP32_MANT_BITS - 1) & 1);
493 return exp == FP32_EXP_INF && (mnt >> (FP32_MANT_BITS - 1) & 1);
533 if (!(a >> (FP32_MANT_BITS - 1) & 1)) {
535 a |= 1ULL << (FP32_MANT_BITS - 1);
794 uint32_t int_mant; // mantissa for result, less than (2 << FP32_MANT_BITS)
806 mnt = (4ULL << FP32_MANT_BITS | mnt >> (FP32_EXP_BITS - 1) |
828 if (int_mant == 1ULL << FP32_MANT_BITS) {
832 if (int_mant == 2ULL << FP32_MANT_BITS) {
1628 x_mnt = (uint64_t)a_mnt << (FP32_MANT_BITS + 4);
1834 x_mnt = ((uint64_t)a_mnt << (FP32_MANT_BITS - FP32_EXP_BITS + 3)) / b_mnt;
1836 (uint64_t)a_mnt << (FP32_MANT_BITS - FP32_EXP_BITS + 3));
2514 op >> (FP32_MANT_BITS - FP16_MANT_BITS));
2529 1ULL << (FP32_MANT_BITS - 1) |
2530 (uint32_t)op << (FP32_MANT_BITS - FP16_MANT_BITS));
2537 1ULL << (FP32_MANT_BITS - 1) |
2538 op >> (FP64_MANT_BITS - FP32_MANT_BITS));
2554 (uint64_t)op << (FP64_MANT_BITS - FP32_MANT_BITS));
2566 return fp32_pack(sgn, FP32_EXP_BIAS, 1ULL << (FP32_MANT_BITS - 1));
2584 return fp32_pack(sgn, FP32_EXP_BIAS + 1, 1ULL << (FP32_MANT_BITS - 1));
2634 if (!(mnt >> (FP32_MANT_BITS - 1) & 1) || alt_hp) {
2650 mnt >> (FP32_MANT_BITS - FP16_BITS) |
2651 !!(mnt & ((1ULL << (FP32_MANT_BITS - FP16_BITS)) - 1)),
2739 (uint32_t)mnt << (FP32_MANT_BITS - FP16_BITS + 1));
2843 if (!(mnt >> (FP32_MANT_BITS - 1) & 1)) {
3034 return ((((op >> 6) & ((1 << FP32_EXP_BITS) - 1)) << FP32_MANT_BITS) |
3121 return fp32_pack(sgn, mnt >> FP32_MANT_BITS ? exp : 0, mnt);
3146 if (!((uint32_t)~(*op1 << 1) >> FP32_MANT_BITS) &&
3147 (uint32_t)~(*op2 << 1) >> FP32_MANT_BITS)
3149 if (!((uint32_t)~(*op2 << 1) >> FP32_MANT_BITS) &&
3150 (uint32_t)~(*op1 << 1) >> FP32_MANT_BITS)
3577 mnt << (FP32_MANT_BITS - 8));
3790 } else if (!((uint32_t)(op << 1) >> (FP32_MANT_BITS - 1))) {
3819 fraction <<= FP32_MANT_BITS - 8;
4136 int expint = FP32_EXP_BIAS + FP32_MANT_BITS;
4528 (uint32_t)FP32_EXP_BIAS << FP32_MANT_BITS; // 1.0
4704 (uint64_t)mnt << (FP64_MANT_BITS - FP32_MANT_BITS),
4793 (uint64_t)mnt << (FP64_MANT_BITS - FP32_MANT_BITS),