Math Domain Error Log. Otherwise log2f is called. This function is used to compute the natural logarithm Base e of a.
That is the argument of the logarithmic function must be greater than zero. Perhaps it would be better if instead of. A float is required.
The problem is that you are probably using python 27.
The math domain error for the mathlog function appears if you pass a zero value into itthe logarithm is not defined for value 0. If 2 arguments are passed it computes the logarithm of desired base of argument a numerically value of logalogBase. This type of error usually occurs when we try to find out the square root of a negative number in python.