fixed_analytics
Fixed-point trigonometric, hyperbolic, exponential, and algebraic functions via CORDIC.
Examples
use I16F16;
use ;
let angle = I16F16from_num;
let = ;
let root = sqrt.unwrap;
assert!;
let log = ln.unwrap;
assert!;
Installation
Requires Rust 1.88 or later.
[]
= "0.2"
For no_std environments:
[]
= { = "0.2", = false }
Available Functions
| Category | Total Functions | Fallible Functions |
|---|---|---|
| Trigonometric | sin, cos, tan, sin_cos, atan, atan2 |
asin, acos |
| Hyperbolic | sinh, cosh, tanh, sinh_cosh, asinh |
acosh, atanh, acoth, coth |
| Exponential | exp, pow2 |
ln, log2, log10 |
| Algebraic | — | sqrt |
Fallible functions return Result<T, Error> and fail on domain violations.
Total functions return T directly and handle all inputs.