Vector Log Natural (LN)
Summary
Element-wise natural logarithm of the input series.
Formula
outReal[i] = log(inReal[i])
Notes
- The logarithm is defined only for positive values: a negative input gives NaN, and a zero input gives negative infinity.
Inputs
inReal— Input value series
Outputs
outReal— Natural log of each input value
Properties
Numerical Stability: Start-Independent
| ☐ Overlap Input |
| ✅ Independent Y-Axis i |
| ☐ Candlestick |
| ✅ Can Output NaN or ±Inf i |
| ☐ Identity at Period 1 |
Implementation
TA-Lib Definition: ln.c · ln.yaml
| Native | File |
|---|---|
| C | ta_LN.c |
| Rust | ln.rs |
| Java | Core_LN.java |
TA-Lib is also available for Python, R and more using a wrapper.
Aliases
Natural Log, Vector Log Natural, Log
See Also
References
- Wikipedia, Natural logarithm: en.wikipedia.org/wiki/Natural_logarithm