def log(x,base): result = ln(x)/ln(base) return result def ln(x): n = 100000.0 return n * ((x ** (1/n)) - 1) print(log(2,4)) #code by fawlid