@@ -25,54 +25,37 @@ You can use these unary functions easily from the `Maths` module. For example:
25
25
26
26
The [ @tbl :maths: basic_unary ] lists these unary functions supported in this module.
27
27
28
- ------------ -------------------------------------------------------
29
- Function Explanation
30
- ------------ -------------------------------------------------------
31
- ` abs ` ` |x| `
32
-
33
- ` neg ` ` -x `
34
-
35
- ` reci ` ` 1/x `
36
-
37
- ` floor ` the largest integer that is smaller than ` x `
28
+ Function | Explanation
29
+ ------------ | -------------------------------------------------------
30
+ ` abs ` | ` |x| `
31
+ ` neg ` | ` -x `
32
+ ` reci ` | ` 1/x `
33
+ ` floor ` | the largest integer that is smaller than ` x `
34
+ ` ceil ` | the smallest integer that is larger than ` x `
35
+ ` round ` | rounds ` x ` towards the bigger integer when on the fence
36
+ ` trunc ` | integer part of ` x `
37
+ ` sqr ` | $x^2$
38
+ ` sqrt ` | $\sqrt{x}$
38
39
39
- ` ceil ` the smallest integer that is larger than ` x `
40
-
41
- ` round ` rounds ` x ` towards the bigger integer when on the fence
42
-
43
- ` trunc ` integer part of ` x `
44
-
45
- ` sqr ` $x^2$
46
-
47
- ` sqrt ` $\sqrt{x}$
48
- ------------ -------------------------------------------------------
49
40
: Basic unary math functions {#tbl:maths: basic_unary }
50
41
51
42
### Basic Binary Functions
52
43
53
44
Unlike the unary ones, the * binary functions* take two floats as inputs and return one float as output.
54
45
Most common arithmetic functions belong to this category, as shown in [ @tbl :maths: binary ] .
55
46
56
- ------------ -------------------------------------------------------
57
- Function Explanation
58
- ------------ -------------------------------------------------------
59
- ` add ` ` x + y `
60
-
61
- ` sub ` ` x - y `
62
-
63
- ` mul ` ` x * y `
47
+ Function | Explanation
48
+ ------------ | -------------------------------------------------------
49
+ ` add ` | ` x + y `
50
+ ` sub ` | ` x - y `
51
+ ` mul ` | ` x * y `
52
+ ` div ` | ` x / y `
53
+ ` fmod ` | ` x % y `
54
+ ` pow ` | $$ x^y $$
55
+ ` hypot ` | $$ \sqrt{x^2 + y^2} $$
56
+ ` atan2 ` | returns $$ \arctan(y/x) $$ , accounting for the sign of the
57
+ | arguments; this is the angle to the vector $$ (x, y) $$ counting from the x-axis.
64
58
65
- ` div ` ` x / y `
66
-
67
- ` fmod ` ` x % y `
68
-
69
- ` pow ` $x^y$
70
-
71
- ` hypot ` $\sqrt{x^2 + y^2}$
72
-
73
- ` atan2 ` returns $\arctan(y/x)$, accounting for the sign of the
74
- arguments; this is the angle to the vector $(x, y)$ counting from the x-axis.
75
- ------------ -------------------------------------------------------
76
59
: Binary math functions {#tbl:maths: binary }
77
60
78
61
### Exponential and Logarithmic Functions
0 commit comments