Difference between revisions of "Abs"

 
(One intermediate revision by the same user not shown)
Line 2: Line 2:
 
[[category:Functions that operate on complex numbers]]
 
[[category:Functions that operate on complex numbers]]
 
[[Category:Doc Status C]] <!-- For Lumina use, do not change -->
 
[[Category:Doc Status C]] <!-- For Lumina use, do not change -->
 +
 +
==Abs(x)==
  
 
The absolute value of a number, or the magnitude of a complex number.
 
The absolute value of a number, or the magnitude of a complex number.
  
For a non-negative real number, <code>[[Abs]](x)</code> returns x.   
+
For a non-negative real number, [[Abs]](x) returns «x».   
 
 
For a negative real number, <code>[[Abs]](x)</code> returns -x.
 
 
 
  
 +
For a negative real number, [[Abs]](x) returns -«x».
  
For a [[Complex Numbers|complex number]], ''a + bj'', <code>[[Abs]](x)</code> returns the magnitude, equal to <ldcmath>\sqrt{a^2+b^2}</ldcmath>.
+
For a [[Complex Numbers|complex number]], ''a + bj'', [[Abs]](x) returns the magnitude, equal to <math>\sqrt{a^2+b^2}</math>.
  
= Complex numbers =
+
== Complex numbers ==
  
A complex number can be written in standard (cartesian) form as <math>a + b j</math>, or in polar form as <math>r e^{\theta j}</math>. Given a complex number, x, <code>[[Abs]](x)</code> gives ''r'', the magnitude from the polar form.  The <math>\theta</math> is given by either [[ComplexRadians]] (or [[ComplexDegrees]]).
+
A complex number can be written in standard (cartesian) form as <math>a + b j</math>, or in polar form as <math>r e^{\theta j}</math>. Given a complex number, «x», [[Abs]](x) gives ''r'', the magnitude from the polar form.  The <math>\theta</math> is given by either [[ComplexRadians]] (or [[ComplexDegrees]]).
  
= Examples =
+
== Examples ==
  
:<code>[[Abs]](0)</code> &rarr; 0
+
:<code>Abs(0) &rarr; 0</code>
:<code>[[Abs]](-0.123)</code> &rarr; 0.123
+
:<code>Abs(-0.123) &rarr; 0.123</code>
:<code>[[Abs]](4.534)</code> &rarr; 4.534
+
:<code>Abs(4.534) &rarr; 4.534</code>
:<code>[[Abs]](-[[INF]])</code> &rarr; [[INF]]
+
:<code>Abs(-INF) &rarr; INF</code>
  
:<code>[[Abs]](-4-3j)</code> &rarr; 5
+
:<code>Abs(-4-3j) &rarr; 5</code>
:<code>[[Abs]](1j)</code> &rarr; 1
+
:<code>Abs(1j) &rarr; 1</code>
  
= See Also =
+
== See Also ==
  
 
* [[Sign]](x)
 
* [[Sign]](x)
 
* [[Complex Numbers]]
 
* [[Complex Numbers]]
* [[ComplexRadians]], [[ComplexDegrees]], [[ImPart]], [[RealPart]]
+
* [[ComplexRadians]]
 +
* [[ComplexDegrees]]
 +
* [[ImPart]]
 +
* [[RealPart]]

Latest revision as of 00:17, 8 March 2016


Abs(x)

The absolute value of a number, or the magnitude of a complex number.

For a non-negative real number, Abs(x) returns «x».

For a negative real number, Abs(x) returns -«x».

For a complex number, a + bj, Abs(x) returns the magnitude, equal to [math]\displaystyle{ \sqrt{a^2+b^2} }[/math].

Complex numbers

A complex number can be written in standard (cartesian) form as [math]\displaystyle{ a + b j }[/math], or in polar form as [math]\displaystyle{ r e^{\theta j} }[/math]. Given a complex number, «x», Abs(x) gives r, the magnitude from the polar form. The [math]\displaystyle{ \theta }[/math] is given by either ComplexRadians (or ComplexDegrees).

Examples

Abs(0) → 0
Abs(-0.123) → 0.123
Abs(4.534) → 4.534
Abs(-INF) → INF
Abs(-4-3j) → 5
Abs(1j) → 1

See Also

Comments


You are not allowed to post comments.