abs

Returns the absolute value of a number.

Syntax

abs(value)

Parameters

Return value

The absolute value of the number.

For complex numbers, the result is calculated using Complex.prototype.abs.

Examples

abs(-10)
10
abs((-2)**88)
309485009821345068724781056
abs(-3+4*I)
5