$abs » History » Version 11
Per Amundsen, 02/16/2023 05:16 PM
1 | 1 | Per Amundsen | _Added in 1.9.0_ |
---|---|---|---|
2 | 2 | Per Amundsen | |
3 | 5 | Per Amundsen | *$abs(N)* |
4 | 1 | Per Amundsen | |
5 | Returns the absolute value of number N. |
||
6 | 5 | Per Amundsen | |
7 | 10 | Per Amundsen | _Supports "Big Integers":https://en.wikipedia.org/wiki/Arbitrary-precision_arithmetic_ |
8 | |||
9 | 5 | Per Amundsen | *Parameters* |
10 | |||
11 | 11 | Per Amundsen | table(ktable). |
12 | |*Parameter*|*Description*| |
||
13 | | N | The number to find the absolute value of. | |
||
14 | 1 | Per Amundsen | |
15 | 6 | Per Amundsen | *Example* |
16 | |||
17 | 1 | Per Amundsen | <pre> |
18 | 7 | Per Amundsen | ;Returns 5. |
19 | //echo -ag $abs(5) |
||
20 | |||
21 | ;Returns 1. |
||
22 | //echo -ag $abs(-1) |
||
23 | 4 | Per Amundsen | </pre> |