In the documentation for the built-in pow() function, the example comment appears to be incorrect.
Current example:
The comment says this is "equivalent to remainder of (10**10)/9", but it should be:
# equivalent to remainder of (10**2)/9
Since the call is pow(10, 2, 9), the exponent is 2, not 10. The result checks out with the correct exponent: 10**2 = 100, and 100 % 9 = 1.
Could this comment be fixed to avoid confusing readers?
In the documentation for the built-in
pow()function, the example comment appears to be incorrect.Current example:
The comment says this is "equivalent to remainder of (10**10)/9", but it should be:
Since the call is
pow(10, 2, 9), the exponent is 2, not 10. The result checks out with the correct exponent: 10**2 = 100, and 100 % 9 = 1.Could this comment be fixed to avoid confusing readers?