In Python how come math.log10() and math.log2() give correct answer but not math.log()

class Solution:
# @param A : string
# @return an integer
def power(self, A):
    if (int(A)<2):
        return 0
    if (math.floor(check)==math.ceil(check)):
        return 1
        return 0

This returns 0 for "5070602400912917605986812821504 whereas if I use math.log10() instead of math.log(), or if I directly use math.log2(). It returns 1.


math. log ( x [, base ])

With one argument, return the natural logarithm of x (to base e ).

With two arguments, return the logarithm of x to the given base , calculated as log(x)/log(base) .

I hope this helps.