go Log10(),以10为底对数
Log10()方法语法
func Log10(x float64) float64
go源码对Log10()方法的介绍:
Log10 returns the decimal logarithm of x. The special cases are the same as for Log.
golang模块math中的Log10()方法,可计算以10为底数的对数值。除此之外,special cases与Log()方法中的special cases的相似。
math.Log10()方法实例代码
func main() {
var log10_v float64 = math.Log10(10)
fmt.Println(log10_v)
}
运行go文件,得到输出:
1