abs
Derives the absolute value. Functional behavior depends on basic data types provided:
Strings (including blanks) are passed through without modifications. This is particularly suitable in combination with vectorization in order
to pass through blank contents, explanatory text, etc.
Vectorization: This function supports vectorization in the 1st function parameter.
Instead of providing a single value, you can provide a set or even a nested set which contain multiple values.
The function will then process every value and its return value contains a corresponding set containing all results.
data type | Description |
---|---|
numeral | Turns number positive |
string | Passed through |
date | Returns Microsoft Excel serial date. If time is provided, then time is the fraction of the day (e.g. 0.5 for 12:00 noon time). |
boolean | Returns 0 if false, 1 if true |
void | Passed through |
set | The absolute values of the elements in the set will be derived (vectorization). |
Indirect parameter passing is disabled
Vectorization is allowed in the 1st function parameter
1
No. | Type | Description |
---|---|---|
1 input |
all types set |
Value Value to convert to absolute value |
Type | Description |
---|---|
all types set |
Absolute value Absolute value(s) as calculated using rules described above |
echo( abs(-1) );
echo( abs(true) );
echo( abs(Hello World) );
echo( abs(date(today)) );
echo( abs(date(now)) );
echo( abs(time(now)) );
1
1
Hello World
45584
45584.9125810185
0.9125810185