-
Notifications
You must be signed in to change notification settings - Fork 0
/
math.go
285 lines (279 loc) · 6.63 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
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
// Code generated by a tool. DO NOT EDIT.
// Package math provides a mockable wrapper for math.
package math
import (
math "math"
)
var _ Interface = &Impl{}
var _ = math.Abs
type Interface interface {
Abs(x float64) float64
Acos(x float64) float64
Acosh(x float64) float64
Asin(x float64) float64
Asinh(x float64) float64
Atan(x float64) float64
Atan2(y float64, x float64) float64
Atanh(x float64) float64
Cbrt(x float64) float64
Ceil(x float64) float64
Copysign(x float64, y float64) float64
Cos(x float64) float64
Cosh(x float64) float64
Dim(x float64, y float64) float64
Erf(x float64) float64
Erfc(x float64) float64
Erfcinv(x float64) float64
Erfinv(x float64) float64
Exp(x float64) float64
Exp2(x float64) float64
Expm1(x float64) float64
FMA(x float64, y float64, z float64) float64
Float32bits(f float32) uint32
Float32frombits(b uint32) float32
Float64bits(f float64) uint64
Float64frombits(b uint64) float64
Floor(x float64) float64
Frexp(f float64) (frac float64, exp int)
Gamma(x float64) float64
Hypot(p float64, q float64) float64
Ilogb(x float64) int
Inf(sign int) float64
IsInf(f float64, sign int) bool
IsNaN(f float64) (is bool)
J0(x float64) float64
J1(x float64) float64
Jn(n int, x float64) float64
Ldexp(frac float64, exp int) float64
Lgamma(x float64) (lgamma float64, sign int)
Log(x float64) float64
Log10(x float64) float64
Log1p(x float64) float64
Log2(x float64) float64
Logb(x float64) float64
Max(x float64, y float64) float64
Min(x float64, y float64) float64
Mod(x float64, y float64) float64
Modf(f float64) (int float64, frac float64)
NaN() float64
Nextafter(x float64, y float64) (r float64)
Nextafter32(x float32, y float32) (r float32)
Pow(x float64, y float64) float64
Pow10(n int) float64
Remainder(x float64, y float64) float64
Round(x float64) float64
RoundToEven(x float64) float64
Signbit(x float64) bool
Sin(x float64) float64
Sincos(x float64) (sin float64, cos float64)
Sinh(x float64) float64
Sqrt(x float64) float64
Tan(x float64) float64
Tanh(x float64) float64
Trunc(x float64) float64
Y0(x float64) float64
Y1(x float64) float64
Yn(n int, x float64) float64
}
type Impl struct{}
func (*Impl) Abs(x float64) float64 {
return math.Abs(x)
}
func (*Impl) Acos(x float64) float64 {
return math.Acos(x)
}
func (*Impl) Acosh(x float64) float64 {
return math.Acosh(x)
}
func (*Impl) Asin(x float64) float64 {
return math.Asin(x)
}
func (*Impl) Asinh(x float64) float64 {
return math.Asinh(x)
}
func (*Impl) Atan(x float64) float64 {
return math.Atan(x)
}
func (*Impl) Atan2(y float64, x float64) float64 {
return math.Atan2(y, x)
}
func (*Impl) Atanh(x float64) float64 {
return math.Atanh(x)
}
func (*Impl) Cbrt(x float64) float64 {
return math.Cbrt(x)
}
func (*Impl) Ceil(x float64) float64 {
return math.Ceil(x)
}
func (*Impl) Copysign(x float64, y float64) float64 {
return math.Copysign(x, y)
}
func (*Impl) Cos(x float64) float64 {
return math.Cos(x)
}
func (*Impl) Cosh(x float64) float64 {
return math.Cosh(x)
}
func (*Impl) Dim(x float64, y float64) float64 {
return math.Dim(x, y)
}
func (*Impl) Erf(x float64) float64 {
return math.Erf(x)
}
func (*Impl) Erfc(x float64) float64 {
return math.Erfc(x)
}
func (*Impl) Erfcinv(x float64) float64 {
return math.Erfcinv(x)
}
func (*Impl) Erfinv(x float64) float64 {
return math.Erfinv(x)
}
func (*Impl) Exp(x float64) float64 {
return math.Exp(x)
}
func (*Impl) Exp2(x float64) float64 {
return math.Exp2(x)
}
func (*Impl) Expm1(x float64) float64 {
return math.Expm1(x)
}
func (*Impl) FMA(x float64, y float64, z float64) float64 {
return math.FMA(x, y, z)
}
func (*Impl) Float32bits(f float32) uint32 {
return math.Float32bits(f)
}
func (*Impl) Float32frombits(b uint32) float32 {
return math.Float32frombits(b)
}
func (*Impl) Float64bits(f float64) uint64 {
return math.Float64bits(f)
}
func (*Impl) Float64frombits(b uint64) float64 {
return math.Float64frombits(b)
}
func (*Impl) Floor(x float64) float64 {
return math.Floor(x)
}
func (*Impl) Frexp(f float64) (frac float64, exp int) {
return math.Frexp(f)
}
func (*Impl) Gamma(x float64) float64 {
return math.Gamma(x)
}
func (*Impl) Hypot(p float64, q float64) float64 {
return math.Hypot(p, q)
}
func (*Impl) Ilogb(x float64) int {
return math.Ilogb(x)
}
func (*Impl) Inf(sign int) float64 {
return math.Inf(sign)
}
func (*Impl) IsInf(f float64, sign int) bool {
return math.IsInf(f, sign)
}
func (*Impl) IsNaN(f float64) (is bool) {
return math.IsNaN(f)
}
func (*Impl) J0(x float64) float64 {
return math.J0(x)
}
func (*Impl) J1(x float64) float64 {
return math.J1(x)
}
func (*Impl) Jn(n int, x float64) float64 {
return math.Jn(n, x)
}
func (*Impl) Ldexp(frac float64, exp int) float64 {
return math.Ldexp(frac, exp)
}
func (*Impl) Lgamma(x float64) (lgamma float64, sign int) {
return math.Lgamma(x)
}
func (*Impl) Log(x float64) float64 {
return math.Log(x)
}
func (*Impl) Log10(x float64) float64 {
return math.Log10(x)
}
func (*Impl) Log1p(x float64) float64 {
return math.Log1p(x)
}
func (*Impl) Log2(x float64) float64 {
return math.Log2(x)
}
func (*Impl) Logb(x float64) float64 {
return math.Logb(x)
}
func (*Impl) Max(x float64, y float64) float64 {
return math.Max(x, y)
}
func (*Impl) Min(x float64, y float64) float64 {
return math.Min(x, y)
}
func (*Impl) Mod(x float64, y float64) float64 {
return math.Mod(x, y)
}
func (*Impl) Modf(f float64) (int float64, frac float64) {
return math.Modf(f)
}
func (*Impl) NaN() float64 {
return math.NaN()
}
func (*Impl) Nextafter(x float64, y float64) (r float64) {
return math.Nextafter(x, y)
}
func (*Impl) Nextafter32(x float32, y float32) (r float32) {
return math.Nextafter32(x, y)
}
func (*Impl) Pow(x float64, y float64) float64 {
return math.Pow(x, y)
}
func (*Impl) Pow10(n int) float64 {
return math.Pow10(n)
}
func (*Impl) Remainder(x float64, y float64) float64 {
return math.Remainder(x, y)
}
func (*Impl) Round(x float64) float64 {
return math.Round(x)
}
func (*Impl) RoundToEven(x float64) float64 {
return math.RoundToEven(x)
}
func (*Impl) Signbit(x float64) bool {
return math.Signbit(x)
}
func (*Impl) Sin(x float64) float64 {
return math.Sin(x)
}
func (*Impl) Sincos(x float64) (sin float64, cos float64) {
return math.Sincos(x)
}
func (*Impl) Sinh(x float64) float64 {
return math.Sinh(x)
}
func (*Impl) Sqrt(x float64) float64 {
return math.Sqrt(x)
}
func (*Impl) Tan(x float64) float64 {
return math.Tan(x)
}
func (*Impl) Tanh(x float64) float64 {
return math.Tanh(x)
}
func (*Impl) Trunc(x float64) float64 {
return math.Trunc(x)
}
func (*Impl) Y0(x float64) float64 {
return math.Y0(x)
}
func (*Impl) Y1(x float64) float64 {
return math.Y1(x)
}
func (*Impl) Yn(n int, x float64) float64 {
return math.Yn(n, x)
}