feat: expand TA-Lib wrapper with math transform functions
- Add 13 new math transform functions: Cos, Sin, Tan, ACos, ASin, ATan, CosH, SinH, TanH, Ceil, Exp, Floor, Sqrt, Ln, Log10 - Implement proper TA-Lib bindings for all math transform operations - Add comprehensive documentation comments to all new functions - Standardize error handling across all wrapper functions using slog.Debug - Refactor function definitions for consistency and maintainability The wrapper now exposes a comprehensive set of mathematical operations from TA-Lib, including trigonometric, hyperbolic, exponential, logarithmic, and rounding functions. All functions follow the established pattern of vector element-wise transformations.
This commit is contained in:
@@ -4,23 +4,25 @@ Go wrapper for selected [TA-Lib](https://ta-lib.org/) functions using [`purego`]
|
||||
|
||||
This project currently exposes a small subset of TA-Lib functions:
|
||||
|
||||
**Cycle Indicators (Hilbert Transform)**
|
||||
- `HT_DCPERIOD`
|
||||
- `HT_DCPHASE`
|
||||
- `HT_PHASOR`
|
||||
- `HT_SINE`
|
||||
- `HT_TRENDMODE`
|
||||
- `Add`
|
||||
- `Div`
|
||||
- `Max`
|
||||
- `MaxIndex`
|
||||
- `Min`
|
||||
- `MinIndex`
|
||||
- `MinMax`
|
||||
- `MinMaxIndex`
|
||||
- `Mult`
|
||||
- `Sub`
|
||||
|
||||
**Math Operators**
|
||||
- `Add`, `Sub`, `Mult`, `Div`
|
||||
- `Max`, `MaxIndex`, `Min`, `MinIndex`
|
||||
- `MinMax`, `MinMaxIndex`
|
||||
- `Sum`
|
||||
|
||||
**Math Transforms**
|
||||
- Trigonometric: `Cos`, `Sin`, `Tan`, `ACos`, `ASin`, `ATan`
|
||||
- Hyperbolic: `CosH`, `SinH`, `TanH`
|
||||
- Exponential/Logarithmic: `Exp`, `Ln`, `Log10`
|
||||
- Rounding: `Ceil`, `Floor`, `Sqrt`
|
||||
|
||||
## Requirements
|
||||
|
||||
- Go `1.26`
|
||||
|
||||
Reference in New Issue
Block a user