commands → abs

abs(x)

The abs function computes the absolute value of a numeric value x.

Examples

abs(2.0);
	2.
abs(-2.0);
	2.
abs(1/2);
	1/2
abs(-1/2);
	1/2

References

Gullberg, Jan. Mathematics: From the Birth of Numbers. Norton, 1996.