| 1 | /* @title: Extended Fixed Point Arithmetic */ |
|---|---|
| 2 | #pragma once |
| 3 | #include <math/fixed.h> |
| 4 | |
| 5 | #define FP_PI 3.14159265358979323846 |
| 6 | #define FX_PI FX(3.14159265358979323846) |
| 7 | #define FX_E FX(2.71828182845045235360) |
| 8 | |
| 9 | fx32_32_t fx_poly_eval(fx32_32_t x, const fx32_32_t *c, int n); |
| 10 | fx32_32_t fx_exp(fx32_32_t x); |
| 11 | fx32_32_t fx_ln(fx32_32_t x); |
| 12 | fx32_32_t fx_sin(fx32_32_t angle); |
| 13 | fx32_32_t fx_cos(fx32_32_t angle); |
| 14 | void fx_sincos(fx32_32_t angle, fx32_32_t *sin_out, fx32_32_t *cos_out); |
| 15 |