Difference between revisions of "LogTen"
m (adding doc status category) |
|||
(4 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
[[Category:Math Functions]] | [[Category:Math Functions]] | ||
+ | [[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 --> | ||
− | The base-10 logarithm. | + | == LogTen(x) == |
+ | The base-10 logarithm of «x». This the the value ''y'' such that ''10^y = x''. | ||
− | + | Unless [[EnableComplexNumbers|complex numbers are enabled]], the parameter «x» must be must be non-negative or a warning will result. If [[Preferences|Show Result Warnings]] is off, or the warning is ignored, the result is [[NaN]]. | |
− | * [[Ln]](X) : The natural logarithm | + | When [[EnableComplexNumbers|complex numbers are enabled]], negative «x» values result in a result that is a complex number. |
+ | |||
+ | == Library == | ||
+ | Math functions | ||
+ | |||
+ | == Examples == | ||
+ | :<code>LogTen(0) → -INF</code> | ||
+ | :<code>LogTen(0.01) → -2</code> | ||
+ | :<code>LogTen(1) → 0</code> | ||
+ | :<code>LogTen(1K) → 3</code> | ||
+ | :<code>LogTen(729)/LogTen(9) → 3</code> | ||
+ | |||
+ | == 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 [[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. | ||
+ | |||
+ | :<code>LogTen(-1) → 1.364j { When EnableComplexNumbers is 1 }</code> | ||
+ | :<code>LogTen(1000j) → 3+0.682j </code> | ||
+ | |||
+ | == See Also == | ||
+ | |||
+ | * [[Ln]](X) : The natural logarithm | ||
+ | * [[ProductLog]] | ||
+ | * [[Exp]](x) | ||
+ | * [[Complex Numbers]] |
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
- Ln(X) : The natural logarithm
- ProductLog
- Exp(x)
- Complex Numbers
Enable comment auto-refresher