I want to calculate x^16 with x being a float. Since this is a time critical calculation, I used four successive calls of
x = FMath::Square(x);
with 0 <= x <= 1
This works for the first 3 calls, but in the fourth it often results in x=inf. Typical initial values of x are 0.99, so this should not cause any numerical instabilities. FMath::Pow(x, 16.0f); also returns inf.
However using standard pow() from math.h instead of FMath works, same for the explicit calculation x = x * x * …] * x.
What could this be?