-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathmath.go
140 lines (106 loc) · 2.6 KB
/
math.go
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
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
package math
import (
"C"
m "math"
)
func fabs(x C.double) C.double {
return C.double(m.Abs(float64(x)))
}
func acos(x C.double) C.double {
return C.double(m.Acos(float64(x)))
}
func acosf(x C.double) C.double {
return C.double(m.Acos(float64(x)))
}
func acosh(x C.double) C.double {
return C.double(m.Acosh(float64(x)))
}
func asin(x C.double) C.double {
return C.double(m.Asin(float64(x)))
}
func asinh(x C.double) C.double {
return C.double(m.Asinh(float64(x)))
}
func atan(x C.double) C.double {
return C.double(m.Atan(float64(x)))
}
func atanh(x C.double) C.double {
return C.double(m.Atanh(float64(x)))
}
func atan2(y C.double, x C.double) C.double {
return C.double(m.Atan2(float64(y), float64(x)))
}
func cbrt(x C.double) C.double {
return C.double(m.Cbrt(float64(x)))
}
func ceil(x C.double) C.double {
return C.double(m.Ceil(float64(x)))
}
func copysign(x C.double, y C.double) C.double {
return C.double(m.Copysign(float64(x), float64(y)))
}
func cos(x C.double) C.double {
return C.double(m.Cos(float64(x)))
}
func cosh(x C.double) C.double {
return C.double(m.Cosh(float64(x)))
}
func fdim(x C.double, y C.double) C.double {
return C.double(m.Dim(float64(x), float64(y)))
}
func erf(x C.double) C.double {
return C.double(m.Erf(float64(x)))
}
func erfc(x C.double) C.double {
return C.double(m.Erfc(float64(x)))
}
func exp(x C.double) C.double {
return C.double(m.Exp(float64(x)))
}
func exp2(x C.double) C.double {
return C.double(m.Exp2(float64(x)))
}
func expm1(x C.double) C.double {
return C.double(m.Expm1(float64(x)))
}
func floor(x C.double) C.double {
return C.double(m.Floor(float64(x)))
}
func frexp(f C.double, expptr *C.int) C.double {
frac, exp := m.Frexp(float64(f))
*expptr = C.int(exp)
return C.double(frac)
}
func log(x C.double) C.double {
return C.double(m.Log(float64(x)))
}
func log10(x C.double) C.double {
return C.double(m.Log10(float64(x)))
}
func fmax(x C.double, y C.double) C.double {
return C.double(m.Max(float64(x), float64(y)))
}
func fmin(x C.double, y C.double) C.double {
return C.double(m.Min(float64(x), float64(y)))
}
func pow(x C.double, y C.double) C.double {
return C.double(m.Pow(float64(x), float64(y)))
}
func round(x C.double) C.double {
return C.double(m.Round(float64(x)))
}
func sqrt(x C.double) C.double {
return C.double(m.Sqrt(float64(x)))
}
func sin(x C.double) C.double {
return C.double(m.Sin(float64(x)))
}
func sinh(x C.double) C.double {
return C.double(m.Sinh(float64(x)))
}
func tan(x C.double) C.double {
return C.double(m.Tan(float64(x)))
}
func tanh(x C.double) C.double {
return C.double(m.Tanh(float64(x)))
}