| 531 | } |
| 532 | |
| 533 | LIBC_INLINE bool is_integer(float x) { |
| 534 | using FPBits = typename fputil::FPBits<float>; |
| 535 | uint32_t x_u = cpp::bit_cast<uint32_t>(x); |
| 536 | int32_t x_e = |
| 537 | static_cast<int32_t>((x_u & FPBits::EXP_MASK) >> FPBits::FRACTION_LEN); |
| 538 | int32_t lsb = cpp::countr_zero(x_u | FPBits::EXP_MASK); |
| 539 | constexpr int32_t UNIT_EXPONENT = |
| 540 | FPBits::EXP_BIAS + static_cast<int32_t>(FPBits::FRACTION_LEN); |
| 541 | return (x_e + lsb >= UNIT_EXPONENT); |
| 542 | } |
| 543 | |
| 544 | #ifndef LIBC_MATH_HAS_SKIP_ACCURATE_PASS |
| 545 | LIBC_INLINE bool larger_exponent(double a, double b) { |
no test coverage detected