abs(x)
computes the absolute value of x, sqrt(x)
computes the
(principal) square root of x, \(\sqrt{x}\).
The naming follows the standard for computer languages such as C or Fortran.
Arguments
- x
a numeric or
complex
vector or array.
Details
These are internal generic primitive functions: methods
can be defined for them individually or via the
Math
group generic. For complex
arguments (and the default method), z
, abs(z) ==
Mod(z)
and sqrt(z) == z^0.5
.
abs(x)
returns an integer
vector when x
is
integer
or logical
.