Absolute value
Graph of absolute value function In mathematics, the absolute value (or modulus) of a number is the difference between that number and 0. Simply speaking, it is the number without a negative sign. So, for example, 3 is the absolute value of both 3 and −3.
Definition
It can be defined as follows: For any real number a, the absolute value of a, denoted |''a''|, is equal to a if a ≥ 0, and to −''a'', if a < 0 (see also: inequality). |a| is never negative, as absolute values are always either positive or zero. Put another way, |''a''| < 0 has no solution for a. The absolute value can be regarded as the distance of a number from zero; indeed the notion of distance in mathematics is a generalisation of the properties of the absolute value. When real numbers are considered as one-dimensional vectors, the absolute value is the magnitude, and the p-norm for any p. Up to a constant factor, every norm in R1 is equal to the absolute value: ||x||=||1||.|x|Properties
The absolute value has the following properties: # |''a''| ≥ 0 # |''a''| = 0 iff a = 0. # |''ab''| = |''a''||''b''| # |''a/b''| = |''a''| / |''b''| (if b ≠ 0) # |''a''+''b''| ≤ |''a''| + |''b''| (the triangle inequality) # |''a''−''b''| ≥ ||''a''| − |''b''|| # # |''a''| ≤ b iff −''b'' ≤ a ≤ b # |''a''| ≥ b iff a ≤ −''b'' or b ≤ a The last two properties are often used in solving inequalities; for example: :|''x'' − 3| ≤ 9 :−9 ≤ x−3 ≤ 9 :−6 ≤ x ≤ 12 For real arguments, the absolute value function f(''x'') = |''x''| is continuous everywhere and differentiable everywhere except for x = 0. For complex arguments, the function is continuous everywhere but differentiable nowhere (One way to see this is to show that it does not obey the Cauchy-Riemann equations). For a complex number z = a + ib, one defines the absolute value or modulus to be |''z''| = √(''a''2 + b2) = √ (''z'' zAbsolute value and complex numbers
(the modulus)Algorithm
If the absolute value would not be a standard function Abs in Pascal it could be easily computed using the following code: program absolute_value; var n: integer; begin read (n); if n < 0 then n := -n; writeln (n) end. In the C programming language, theabs(), labs(), llabs() (in C99), fabs(), fabsf(), and fabsl() functions compute the absolute value of an operand. Coding the integer version of the function is trivial, ignoring the boundary case where the largest negative integer is input:
int abs(int i)
{
if (i < 0)
return -i;
else
return i;
}
The floating-point versions are trickier, as they have to contend with special codes for infinity and not-a-numbers.
Category:Numeration
de:Absoluter Betrag
es:Valor absoluto
fi:Itseisarvo
fr:Valeur absolue
is:Algildi
he:ערך מוחלט
nl:Absolute waarde
ja:絶対値
pl:Wartość bezwzględna
sv:Absolutbelopp
zh:绝对值
bsolute value
Asolute value
Abolute value
Abslute value
Absoute value
Absolte value
Absolue value
Absolut value
Absolutevalue
Absolute alue
Absolute vlue
Absolute vaue
Absolute vale
Absolute valu
bAsolute value
Asbolute value
Aboslute value
Absloute value
Absoulte value
Absoltue value
Absoluet value
Absolut evalue
Absolutev alue
Absolute avlue
Absolute vlaue
Absolute vaule
Absolute valeu
Absolute valu
AAbsolute value
Abbsolute value
Abssolute value
Absoolute value
Absollute value
Absoluute value
Absolutte value
Absolutee value
Absolute value
Absolute vvalue
Absolute vaalue
Absolute vallue
Absolute valuue
Absolute valuee
bsolute value
asolute value
abolute value
abslute value
absoute value
absolte value
absolue value
absolut value
absolutevalue
absolute alue
absolute vlue
absolute vaue
absolute vale
absolute valu
basolute value
asbolute value
aboslute value
absloute value
absoulte value
absoltue value
absoluet value
absolut evalue
absolutev alue
absolute avlue
absolute vlaue
absolute vaule
absolute valeu
absolute valu
aabsolute value
abbsolute value
abssolute value
absoolute value
absollute value
absoluute value
absolutte value
absolutee value
absolute value
absolute vvalue
absolute vaalue
absolute vallue
absolute valuue
absolute valuee