GO語言"math"包中"Pow10"函數的用法及代碼示例。
用法:
func Pow10(n int) float64
Pow10 返回 10**n,即 n 的以 10 為底的 index 。
特殊情況是:
Pow10(n) = 0 for n < -323 Pow10(n) = +Inf for n > 308
例子:
package main
import (
"fmt"
"math"
)
func main() {
c := math.Pow10(2)
fmt.Printf("%.1f", c)
}
輸出:
100.0
相關用法
- GO Pow用法及代碼示例
- GO Pool用法及代碼示例
- GO Polar用法及代碼示例
- GO PutUvarint用法及代碼示例
- GO ParseAddress用法及代碼示例
- GO PlainAuth用法及代碼示例
- GO Print用法及代碼示例
- GO ParseUint用法及代碼示例
- GO ParseIP用法及代碼示例
- GO Printf用法及代碼示例
- GO ParseMediaType用法及代碼示例
- GO ParseInt用法及代碼示例
- GO ParseCIDR用法及代碼示例
- GO PutVarint用法及代碼示例
- GO Perm用法及代碼示例
- GO Pipe用法及代碼示例
- GO ParseInLocation用法及代碼示例
- GO PathUnescape用法及代碼示例
- GO ParseDuration用法及代碼示例
- GO ParseFile用法及代碼示例
注:本文由純淨天空篩選整理自golang.google.cn大神的英文原創作品 Pow10。非經特殊聲明,原始代碼版權歸原作者所有,本譯文未經允許或授權,請勿轉載或複製。