3 ms·
Title is a bit misleading, it's really referring to "(int) pow(n,2)", and happens since pow() is a floating point function, and default float to int conversion
by HarHarVeryFunny 3y ago
Title is a bit misleading, it's really referring to "(int) pow(n,2)", and happens since pow() is a floating point function, and default float to int conversion is by truncation.
i.e. if pow(5,2) is 24.999, then (int) pow(5,2) is 24.
If you want 25, then use round(pow(5,2)) instead.