ABS
The ABS function returns the absolute value of the argument.
The function type depends on the argument type as follows:
Argument type | Function type |
---|---|
Integer | Integer |
Numeric | Numeric |
- argument-1
- Must be of class numeric.
The equivalent arithmetic expression is as follows:
- When the value of argument-1 is zero or positive, (argument-1) is returned.
- When the value of argument-1 is negative, (– (argument-1)) is returned.