-
Notifications
You must be signed in to change notification settings - Fork 30
/
snek-math.builtin
89 lines (88 loc) · 1.57 KB
/
snek-math.builtin
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
#
# Copyright © 2019 Keith Packard <keithp@keithp.com>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# General Public License for more details.
#
#
# Number-theoretic and representation functions
#
math.ceil, 1
math.copysign, 2
math.fabs, 1
math.factorial, 1
math.floor, 1
math.fmod, 2
math.frexp, 1
math.fsum, 1
math.gcd, 2
math.isclose, -1
rel_tol,-2
abs_tol,-2
math.isfinite, 1
math.isinf, 1
math.isnan, 1
math.ldexp, 2
math.modf, 1
math.remainder, 2
math.trunc, 1
round, 1
#
# Power and logarithmic functions
#
math.exp, 1
math.expm1, 1
math.exp2, 1
math.log, 1
math.log1p, 1
math.log2, 1
math.log10, 1
math.pow, 2
pow, 2, =math.pow
#
# Trigonometric functions
#
math.acos, 1
math.asin, 1
math.atan, 1
math.atan2, 2
math.cos, 1
math.hypot, 2
math.sin, 1
math.tan, 1
#
# Angular conversion
#
math.degrees, 1
math.radians, 1
#
# Hyperbolic functions
#
math.acosh, 1
math.asinh, 1
math.atanh, 1
math.cosh, 1
math.sinh, 1
math.tanh, 1
#
# Special functions
#
math.erf, 1
math.erfc, 1
math.gamma, 1
math.lgamma, 1
#
# constants
#
math.pi, -2, 3.141592653589793
math.e, -2, 2.718281828459045
math.tau, -2, 6.283185307179586
math.inf, -2, (snek_poly_t)(float)INFINITY
math.nan, -2, (snek_poly_t)(float)NAN