| 5169 | // Same as above, two LSBs below 1.0 -- also inside the snap window. |
| 5170 | template <typename FP> |
| 5171 | static void test_pow_two_ulps_below_one_impl() { |
| 5172 | const FP just_below = FP::from_raw(static_cast<raw_t<FP>>(FP::SCALE - 2)); |
| 5173 | const FP one(1.0f); |
| 5174 | const FP gamma_2_8(2.8f); |
| 5175 | const FP gamma_3_2(3.2f); |
| 5176 | FL_CHECK_EQ(FP::pow(just_below, gamma_2_8).raw(), one.raw()); |
| 5177 | FL_CHECK_EQ(FP::pow(just_below, gamma_3_2).raw(), one.raw()); |
| 5178 | } |
| 5179 | |
| 5180 | // For signed types: pow(0.5, 2.0) approx 0.25 -- well below 1.0, snap must NOT |
| 5181 | // fire. Excludes u-types since their log2_fp doesn't support base < 1.0. |