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

全栈后端 / go语法 :













Copyright © 2022-2024 笨鸟工具 x1y1z1.com All Rights Reserved.