Difference between revisions of "Abs"

From WikiManual
Jump to: navigation, search
 
m (Removed double link)
 
(3 intermediate revisions by 2 users not shown)
Line 1: Line 1:
Absolute Value ''UNARY''
+
===[[Operators]]:===
 +
{{Basic Commands}}
 +
 
 +
Absolute Value '''UNARY'''
  
 
Returns the absolute value of the top value on the stack.  Absolute value is defined as:
 
Returns the absolute value of the top value on the stack.  Absolute value is defined as:

Latest revision as of 00:36, 25 December 2005

Operators:

Basic Commands:

add & sub
mult & div
rnd
*
mod
sgn
abs

Absolute Value UNARY

Returns the absolute value of the top value on the stack. Absolute value is defined as:

x abs

is

x if x >= 0
-x if x < 0