Vector Arithmetic Subtraction (SUB)
Summary
Element-wise subtraction of two input series.
Formula
outReal[i] = inReal0[i] - inReal1[i]
Inputs
inReal0— Minuend seriesinReal1— Subtrahend series
Outputs
outReal— Per-element difference inReal0 - inReal1
Properties
Numerical Stability: Start-Independent
| ☐ Overlap Input |
| ✅ Independent Y-Axis i |
| ☐ Candlestick |
| ☐ Can Output NaN or ±Inf |
| ☐ Identity at Period 1 |
Implementation
TA-Lib Definition: sub.c · sub.yaml
| Native | File |
|---|---|
| C | ta_SUB.c |
| Rust | sub.rs |
| Java | Core_SUB.java |
TA-Lib is also available for Python, R and more using a wrapper.
Aliases
Subtract, Vector Subtraction