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) → -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]]. | |
− | |||
− | |||
− | |||
− | |||
− | = Complex numbers = | ||
− | |||
− | When «x» is negative or complex, the result of | ||
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>LogTen(-1) → 1.364j { When EnableComplexNumbers is 1 }</code> |
− | :<code>LogTen(1000j) | + | :<code>LogTen(1000j) → 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]] | ||
− | |||
− |
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