Strange behaviour of the pow function

You have set a to be an int. pow() generates a floating point number, that in SOME cases may be just a hair less than 100 or 10000 (as we see here.) Then you stuff that into the integer, which TRUNCATES to an integer. So you lose that fractional part. Oops. If you really needed … Read more