fixed_analytics 0.1.0

Fixed-point mathematical functions using the CORDIC algorithm
Documentation

fixed_analytics

Fixed-point mathematical functions using the CORDIC algorithm. Designed for embedded systems and environments without hardware floating-point support.

Crates.io CI Rust unsafe forbidden MIT licensed codecov

Examples

use fixed::types::I16F16;
use fixed_analytics::{sin, cos, sqrt, ln};

let angle = I16F16::from_num(0.5);
let (s, c) = (sin(angle), cos(angle));

let root = sqrt(I16F16::from_num(2.0));  // ≈ 1.414

let log = ln(I16F16::from_num(2.718)).unwrap();  // ≈ 1.0

Installation

Requires Rust 1.88 or later.

[dependencies]
fixed_analytics = "0.1"

For no_std environments:

[dependencies]
fixed_analytics = { version = "0.1", default-features = false }

Details

Category Functions
Trigonometric sin, cos, tan, sin_cos, asin, acos, atan, atan2
Hyperbolic sinh, cosh, tanh, coth, sinh_cosh, asinh, acosh, atanh, acoth
Exponential exp, ln, log2, log10
Algebraic sqrt