(abs number)


Specify that number's distance from 0 (zero), disregarding direction (positive or negative).


This function returns the absolute value of the number. You can use a real number or an integer. This function takes exactly one argument.

Examples

Code Returns
(abs 56) 56
(abs -2.3) 2.30000
(abs -49) 49

NOTES

Tell me about...

(fix number)

(float number)

(minusp number)

LISP Compatibility

Programming Overview of LISP (LISt Processing) Language