go Exp2()
Exp2()方法语法
func Exp2(x float64) float64
go源码对Exp2()方法的介绍:
Exp2 returns 2**x, the base-2 exponential of x.
Special cases are the same as Exp.
golang标准库math模块中的Exp2()方法,可返回值2的x次方,即返回2**x。
math.Expm1()方法实例代码
func main() {
exp2_v := math.Exp2(5)
fmt.Println(exp2_v)
}
运行go文件,得到输出:
32