| 5144 | // thanks to the `base == one` short-circuit, but lock it in. |
| 5145 | template <typename FP> |
| 5146 | static void test_pow_exactly_one_impl() { |
| 5147 | const FP one(1.0f); |
| 5148 | const FP two(2.0f); |
| 5149 | const FP gamma_2_8(2.8f); |
| 5150 | const FP gamma_3_2(3.2f); |
| 5151 | FL_CHECK_EQ(FP::pow(one, two).raw(), one.raw()); |
| 5152 | FL_CHECK_EQ(FP::pow(one, gamma_2_8).raw(), one.raw()); |
| 5153 | FL_CHECK_EQ(FP::pow(one, gamma_3_2).raw(), one.raw()); |
| 5154 | } |
| 5155 | |
| 5156 | // pow(base, exp) where base.raw() == SCALE - 1 (one ULP below 1.0). Without |
| 5157 | // the snap, the polynomial gives a value ~50-100 LSB below expected. With |