1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86
|
package main
import ( "fmt" "math" )
func main() { fmt.Println(math.IsNaN(3.4)) fmt.Println(math.Ceil(1.000001)) fmt.Println(math.Floor(1.999999)) fmt.Println(math.Trunc(1.999999)) fmt.Println(math.Abs(-1.3)) fmt.Println(math.Max(-1.3, 0)) fmt.Println(math.Min(-1.3, 0)) fmt.Println(math.Dim(-12, -19)) fmt.Println(math.Dim(-12, 19)) fmt.Println(math.Mod(9, 4)) fmt.Println(math.Sqrt(9)) fmt.Println(math.Cbrt(8)) fmt.Println(math.Hypot(3, 4)) fmt.Println(math.Pow(2, 8)) fmt.Println(math.Log(1)) fmt.Println(math.Log2(16)) fmt.Println(math.Log10(1000))
}
|