abs[]

Returns the absolute value of number.

The abs[] function is a function that returns the absolute value of a number. The absolute value of a number is the number without its sign, so if the input is a negative number, the function returns the positive version of that number. For example, abs[-5] would return 5 and abs[3] would return 3.

Syntax

abs[x]

Parameters

x Number whose absolute value is computed.
Return Value Absolute value of x.

Examples

#<result> = abs[-5]
(print,#<result>)

result: 5


#<result> = abs[3]
(print,#<result>)

result: 3