mirror of
https://github.com/lcn2/calc.git
synced 2025-08-19 01:13:27 +03:00
Release calc version 2.10.3t5.45
This commit is contained in:
16
help/abs
16
help/abs
@@ -15,14 +15,18 @@ TYPES
|
||||
eps ignored if x is real, nonzero real for complex x,
|
||||
defaults to epsilon().
|
||||
|
||||
return real
|
||||
return non-negative real
|
||||
|
||||
DESCRIPTION
|
||||
If x is real, returns x if x is positive or zero, -x if x is negative.
|
||||
If x is real, returns the absolute value of x, i.e. x if x >= 0,
|
||||
-x if x < 0.
|
||||
|
||||
For complex x, returns the multiple of eps nearest or next to nearest
|
||||
to the absolute value of x. The result usually has error less in
|
||||
absolute value than abs(eps), but should not exceed 0.75 * abs(eps).
|
||||
For complex x with zero real part, returns the absolute value of im(x).
|
||||
|
||||
For other complex x, returns the multiple of eps nearest to the absolute
|
||||
value of x, or in the case of two equally near nearest values, the
|
||||
the nearest even multiple of eps. In particular, with eps = 10^-n,
|
||||
the result will be the absolute value correct to n decimal places.
|
||||
|
||||
EXAMPLE
|
||||
> print abs(3.4), abs(-3.4)
|
||||
@@ -35,7 +39,7 @@ LIMITS
|
||||
none
|
||||
|
||||
LIBRARY
|
||||
none
|
||||
NUMBER *qqabs(NUMBER *x)
|
||||
|
||||
SEE ALSO
|
||||
cmp, epsilon, hypot, norm, near, obj
|
||||
|
Reference in New Issue
Block a user