Python math module logarithm functions
Question: > **Possible Duplicate:**  
>  [Inaccurate Logarithm in
> Python](http://stackoverflow.com/questions/931995/inaccurate-logarithm-in-
> python)

Why are the `math.log10(x)` and `math.log(x,10)` results different?

    
    
    In [1]: from math import *
    
    In [2]: log10(1000)
    Out[2]: 3.0
    
    In [3]: log(1000,10)
    Out[3]: 2.9999999999999996
    


Answer: It's a known bug : <http://bugs.python.org/issue3724>

Seems logX(y) is always more precise than the equivalent log(Y, X).

