abs

Returns the absolute value of the argument.

The result is equivalent to plus(arg) for positive numbers and to minus(arg) for negative numbers.

Note: This operation rounds the result and may set flags. To return the absolute value without rounding or setting flags use the 'copyAbs' function.

D
abs
(
D
)
(
in D arg
,
Context context = D.context
)

Meta

Standards

Implements the 'abs' function in the specification. (p. 26)

Flags: INVALID_OPERATION