| 5158 | // the snap, this must collapse to exactly one. |
| 5159 | template <typename FP> |
| 5160 | static void test_pow_one_ulp_below_one_impl() { |
| 5161 | const FP just_below = FP::from_raw(static_cast<raw_t<FP>>(FP::SCALE - 1)); |
| 5162 | const FP one(1.0f); |
| 5163 | const FP gamma_2_8(2.8f); |
| 5164 | const FP gamma_3_2(3.2f); |
| 5165 | FL_CHECK_EQ(FP::pow(just_below, gamma_2_8).raw(), one.raw()); |
| 5166 | FL_CHECK_EQ(FP::pow(just_below, gamma_3_2).raw(), one.raw()); |
| 5167 | } |
| 5168 | |
| 5169 | // Same as above, two LSBs below 1.0 -- also inside the snap window. |
| 5170 | template <typename FP> |