abs - compute the absolute value
val.abs()
The abs() method computes the absolute value
of the given val. If val is an arithmetic scalar or if
it a packed arithmetic array, the result has the same type as
val. If val is a List or
Array and if each element of val is an
arithmetic type, then a packed array will be created based on packing
rules (see pack for more information).
A value or array which is the absolute value of the given val
TypeCheck if any portion of val
is not arithmetic
a = {-1.5, 0, 3.5}
a.abs()
1.5 0. 3.5