| 520 | #endif // LIBC_MATH_HAS_SKIP_ACCURATE_PASS |
| 521 | |
| 522 | LIBC_INLINE bool is_odd_integer(float x) { |
| 523 | using FPBits = typename fputil::FPBits<float>; |
| 524 | uint32_t x_u = cpp::bit_cast<uint32_t>(x); |
| 525 | int32_t x_e = |
| 526 | static_cast<int32_t>((x_u & FPBits::EXP_MASK) >> FPBits::FRACTION_LEN); |
| 527 | int32_t lsb = cpp::countr_zero(x_u | FPBits::EXP_MASK); |
| 528 | constexpr int32_t UNIT_EXPONENT = |
| 529 | FPBits::EXP_BIAS + static_cast<int32_t>(FPBits::FRACTION_LEN); |
| 530 | return (x_e + lsb == UNIT_EXPONENT); |
| 531 | } |
| 532 | |
| 533 | LIBC_INLINE bool is_integer(float x) { |
| 534 | using FPBits = typename fputil::FPBits<float>; |
no test coverage detected