-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathexample_test.go
More file actions
122 lines (95 loc) · 1.61 KB
/
Copy pathexample_test.go
File metadata and controls
122 lines (95 loc) · 1.61 KB
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
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
package floats_test
import (
"fmt"
"github.com/shogo82148/floats"
)
func ExampleFloat16_Abs() {
f := floats.NewFloat16(-2)
x := f.Abs()
fmt.Printf("%.1f\n", x)
f = floats.NewFloat16(2)
y := f.Abs()
fmt.Printf("%.1f\n", y)
// Output:
// 2.0
// 2.0
}
func ExampleFloat32_Abs() {
f := floats.NewFloat32(-2)
x := f.Abs()
fmt.Printf("%.1f\n", x)
f = floats.NewFloat32(2)
y := f.Abs()
fmt.Printf("%.1f\n", y)
// Output:
// 2.0
// 2.0
}
func ExampleFloat64_Abs() {
f := floats.NewFloat64(-2)
x := f.Abs()
fmt.Printf("%.1f\n", x)
f = floats.NewFloat64(2)
y := f.Abs()
fmt.Printf("%.1f\n", y)
// Output:
// 2.0
// 2.0
}
func ExampleFloat128_Abs() {
f := floats.NewFloat128(-2)
x := f.Abs()
fmt.Printf("%.1f\n", x)
f = floats.NewFloat128(2)
y := f.Abs()
fmt.Printf("%.1f\n", y)
// Output:
// 2.0
// 2.0
}
func ExampleFloat256_Abs() {
f := floats.NewFloat256(-2)
x := f.Abs()
fmt.Printf("%.1f\n", x)
f = floats.NewFloat256(2)
y := f.Abs()
fmt.Printf("%.1f\n", y)
// Output:
// 2.0
// 2.0
}
func ExampleFloat16_Acos() {
f := floats.NewFloat16(1)
x := f.Acos()
fmt.Printf("%.1f\n", x)
// Output:
// 0.0
}
func ExampleFloat32_Acos() {
f := floats.NewFloat32(1)
x := f.Acos()
fmt.Printf("%.1f\n", x)
// Output:
// 0.0
}
func ExampleFloat64_Acos() {
f := floats.NewFloat64(1)
x := f.Acos()
fmt.Printf("%.1f\n", x)
// Output:
// 0.0
}
func ExampleFloat128_Acos() {
f := floats.NewFloat128(1)
x := f.Acos()
fmt.Printf("%.1f\n", x)
// Output:
// 0.0
}
func ExampleFloat256_Acos() {
f := floats.NewFloat256(1)
x := f.Acos()
fmt.Printf("%.1f\n", x)
// Output:
// 0.0
}