python里有内置的求对数的函数么
导读:python里有内置的求对数的函数么?在python中有内置的求对数的函数。 log( 方法返回x的自然对数,对于x>0。语法以下是log( 方法的语法:#!/usr/bin/pythonimport math # This wil...
python里有内置的求对数的函数么?
在python中有内置的求对数的函数。 log()方法返回x的自然对数,对于x> 0。语法以下是log()方法的语法:
#!/usr/bin/pythonimport math # This will import math moduleprint "math.log(100.12) : ", math.log(100.12)print "math.log(100.72) : ", math.log(100.72)print "math.log(119L) : ", math.log(119L)print "math.log(math.pi) : ", math.log(math.pi)当我们运行上面的程序,它会产生以下结果:
math.log(100.12) : 4.60636946656math.log(100.72) : 4.61234438974math.log(119L) : 4.77912349311math.log(math.pi) : 1.14472988585
声明:本文内容由网友自发贡献,本站不承担相应法律责任。对本内容有异议或投诉,请联系2913721942#qq.com核实处理,我们将尽快回复您,谢谢合作!
若转载请注明出处: python里有内置的求对数的函数么
本文地址: https://pptw.com/jishu/58345.html
