Skip to content

Commit c835376

Browse files
authored
Merge pull request #8 from GeEom/docs-update
v2.0.1: Update docs.rs documentation
2 parents 6952d0f + 95a24ab commit c835376

4 files changed

Lines changed: 36 additions & 33 deletions

File tree

.github/workflows/auto-tag.yml

Lines changed: 0 additions & 22 deletions
This file was deleted.

Cargo.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
[package]
22
name = "fixed_analytics"
3-
version = "2.0.0"
3+
version = "2.0.1"
44
edition = "2024"
55
rust-version = "1.88"
66
authors = ["David Gathercole"]
7-
description = "Fixed-point mathematical functions using the CORDIC algorithm"
7+
description = "Fixed-point mathematical functions. Accurate, deterministic, and panic free."
88
repository = "https://github.com/GeEom/fixed_analytics"
99
documentation = "https://docs.rs/fixed_analytics"
1010
readme = "README.md"
1111
license = "MIT"
12-
keywords = ["cordic", "fixed-point", "trigonometry", "math", "no_std"]
12+
keywords = ["fixed-point", "trigonometry", "math", "no_std", "deterministic"]
1313
categories = ["mathematics", "no-std", "algorithms", "embedded"]
1414

1515
[package.metadata.docs.rs]

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,14 +30,14 @@ Requires Rust 1.88 or later.
3030

3131
```toml
3232
[dependencies]
33-
fixed_analytics = "2.0.0"
33+
fixed_analytics = "2.0.1"
3434
```
3535

3636
For `no_std` environments:
3737

3838
```toml
3939
[dependencies]
40-
fixed_analytics = { version = "2.0.0", default-features = false }
40+
fixed_analytics = { version = "2.0.1", default-features = false }
4141
```
4242

4343
## Available Functions

src/lib.rs

Lines changed: 31 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
//! Fixed-point math via CORDIC. No floating-point ops, `no_std` compatible.
1+
//! Fixed-point mathematical functions: accurate, deterministic, and guaranteed not to panic.
2+
//!
3+
//! `no_std` compatible with no floating-point operations.
24
//!
35
//! # Quick Start
46
//!
@@ -8,22 +10,45 @@
810
//!
911
//! let angle = I16F16::from_num(0.5);
1012
//! let (s, c) = (sin(angle), cos(angle));
13+
//!
1114
//! let root = sqrt(I16F16::from_num(2.0)).unwrap();
15+
//! assert!((root.to_num::<f32>() - 1.414).abs() < 0.001);
16+
//!
1217
//! let log = ln(I16F16::E).unwrap();
18+
//! assert!((log.to_num::<f32>() - 1.0).abs() < 0.01);
1319
//! ```
1420
//!
15-
//! # Precision
21+
//! # Available Functions
22+
//!
23+
//! **Total functions** return `T` directly, saturating on overflow.
24+
//! **Fallible functions** return [`Result<T, Error>`] on domain violations.
1625
//!
17-
//! | Type | Accuracy |
18-
//! |------|----------|
26+
//! | Category | Total | Fallible |
27+
//! |--------------|-------|----------|
28+
//! | Trigonometric | [`sin`], [`cos`], [`tan`], [`sin_cos`], [`atan`], [`atan2`] | [`asin`], [`acos`] |
29+
//! | Hyperbolic | [`sinh`], [`cosh`], [`tanh`], [`sinh_cosh`], [`asinh`] | [`acosh`], [`atanh`], [`acoth`], [`coth`] |
30+
//! | Exponential | [`exp`], [`pow2`] | [`ln`], [`log2`], [`log10`] |
31+
//! | Algebraic | — | [`sqrt`] |
32+
//!
33+
//! Functions use polynomial evaluation, CORDIC, and Newton-Raphson techniques.
34+
//! Complete absence of panic is verified at the linker level via the
35+
//! [`no-panic`](https://github.com/dtolnay/no-panic) crate.
36+
//!
37+
//! # Accuracy
38+
//!
39+
//! | Type | Typical Accuracy |
40+
//! |------|------------------|
1941
//! | `I16F16` | ~4 decimal digits |
2042
//! | `I32F32` | ~8 decimal digits |
2143
//!
44+
//! All functions are benchmarked against MPFR reference implementations.
45+
//! Accuracy regressions are not permitted across releases.
46+
//!
2247
//! # Features
2348
//!
24-
//! - `std` (default): Enables `std::error::Error` impl
49+
//! - **`std`** (default): Enables `std::error::Error` impl on [`Error`]
2550
//!
26-
//! See [`kernel`] module for algorithm details.
51+
//! See the [`kernel`] module for algorithm details.
2752
2853
#![no_std]
2954
#![cfg_attr(docsrs, feature(doc_cfg))]

0 commit comments

Comments
 (0)