Difference between revisions of "LogTen"

m (category)
 
(One intermediate revision by the same user not shown)
Line 3: Line 3:
 
[[Category:Doc Status C]] <!-- For Lumina use, do not change -->
 
[[Category:Doc Status C]] <!-- For Lumina use, do not change -->
  
= LogTen(x) =
+
== LogTen(x) ==
 
 
 
The base-10 logarithm of «x».  This the the value ''y'' such that ''10^y = x''.
 
The base-10 logarithm of «x».  This the the value ''y'' such that ''10^y = x''.
  
Line 11: Line 10:
 
When [[EnableComplexNumbers|complex numbers are enabled]], negative «x» values result in a result that is a complex number.
 
When [[EnableComplexNumbers|complex numbers are enabled]], negative «x» values result in a result that is a complex number.
  
= Library =
+
== Library ==
 
 
 
Math functions  
 
Math functions  
  
= Examples =
+
== Examples ==
 +
:<code>LogTen(0) &rarr; -INF</code>
 +
:<code>LogTen(0.01) &rarr; -2</code>
 +
:<code>LogTen(1) &rarr; 0</code>
 +
:<code>LogTen(1K) &rarr; 3</code>
 +
:<code>LogTen(729)/LogTen(9) &rarr; 3</code>
  
:LogTen(0) &rarr; -[[INF]]
+
== Complex numbers ==
:LogTen(0.01) &rarr; -2
+
When «x» is negative or complex, the result of [[LogTen]](x) is a complex number.  If you want [[LogTen]] to return a complex number for a negative parameter, you must set the system variable [[EnableComplexNumbers]] to 1, otherwise a warning is issued with a result of [[NaN]].  To set [[EnableComplexNumbers]], see [[EnableComplexNumbers|enabling complex numbers]].
:LogTen(1) &rarr; 0
 
:LogTen(1K) &rarr; 3
 
:LogTen(729) / LogTen(9) &rarr; 3
 
 
 
= Complex numbers =
 
 
 
When «x» is negative or complex, the result of <code>[[LogTen]](x)</code> is a complex number.  If you want [[LogTen]] to return a complex number for a negative parameter, you must set the system variable [[EnableComplexNumbers]] to 1, otherwise a warning is issued with a result of [[NaN]].  To set [[EnableComplexNumbers]], see [[EnableComplexNumbers|enabling complex numbers]].
 
  
 
A complex number can be written in polar form as <math>r e^{\theta j}</math>. Thus, <math>\log x = \log r + {\theta\over{\log(10)}} j</math>.  In other words, the real part of the result is the log magnitude, and the imaginary part is proportional to phasor angle, where <math>\theta</math> is written here as if in radians.
 
A complex number can be written in polar form as <math>r e^{\theta j}</math>. Thus, <math>\log x = \log r + {\theta\over{\log(10)}} j</math>.  In other words, the real part of the result is the log magnitude, and the imaginary part is proportional to phasor angle, where <math>\theta</math> is written here as if in radians.
  
:<code>LogTen(-1)</code>&rarr;1.364j     ''&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Note: when [[EnableComplexNumbers]] is 1''
+
:<code>LogTen(-1) &rarr; 1.364j     { When EnableComplexNumbers is 1 }</code>
:<code>LogTen(1000j)</code>&rarr;3+0.682j
+
:<code>LogTen(1000j) &rarr; 3+0.682j </code>
  
= See Also =
+
== See Also ==
  
* [[Ln]](X) : The natural logarithm.
+
* [[Ln]](X) : The natural logarithm
 +
* [[ProductLog]]
 
* [[Exp]](x)
 
* [[Exp]](x)
 
* [[Complex Numbers]]
 
* [[Complex Numbers]]
 
<comments />
 

Latest revision as of 21:38, 17 February 2016


LogTen(x)

The base-10 logarithm of «x». This the the value y such that 10^y = x.

Unless complex numbers are enabled, the parameter «x» must be must be non-negative or a warning will result. If Show Result Warnings is off, or the warning is ignored, the result is NaN.

When complex numbers are enabled, negative «x» values result in a result that is a complex number.

Library

Math functions

Examples

LogTen(0) → -INF
LogTen(0.01) → -2
LogTen(1) → 0
LogTen(1K) → 3
LogTen(729)/LogTen(9) → 3

Complex numbers

When «x» is negative or complex, the result of LogTen(x) is a complex number. If you want LogTen to return a complex number for a negative parameter, you must set the system variable EnableComplexNumbers to 1, otherwise a warning is issued with a result of NaN. To set EnableComplexNumbers, see enabling complex numbers.

A complex number can be written in polar form as [math]\displaystyle{ r e^{\theta j} }[/math]. Thus, [math]\displaystyle{ \log x = \log r + {\theta\over{\log(10)}} j }[/math]. In other words, the real part of the result is the log magnitude, and the imaginary part is proportional to phasor angle, where [math]\displaystyle{ \theta }[/math] is written here as if in radians.

LogTen(-1) → 1.364j { When EnableComplexNumbers is 1 }
LogTen(1000j) → 3+0.682j

See Also

Comments


You are not allowed to post comments.