abs()

Returns the absolute value of a integer, real or complex number

Syntax
y = abs(x)

Arguments
Name Description Range Type Required
x number (-∞, ∞) integer, real, complex yes

Examples

a = abs(-45)
returns 45

Defined in

Built in

See Also

cint(), exp(), float(), int(), log(), log10(), pow(), sgn(), sqrt()

Notes/Equations

In the case of a complex number, the abs function accepts one complex argument and returns the magnitude of its complex argument as a positive real number.

 

Privacy Statement  | Terms of Use  | Legal | Contact Us  | © Agilent 2000-2008 

Contents
Additional Resources