#equality #comparison #floating-point #assert #approximimate

no-std approxim

Approximate floating point equality comparisons and assertions

5 releases

Uses new Rust 2024

new 0.6.4 Mar 22, 2025
0.6.3 Mar 20, 2025
0.6.2 Mar 20, 2025
0.6.1 Mar 20, 2025
0.6.0 Mar 20, 2025

#929 in Rust patterns

Download history 231/week @ 2025-03-15

231 downloads per month
Used in approx-derive

Apache-2.0

51KB
1K SLoC

approxim

Test Crate License Apache Docs Minimum rustc version

This is a fork of the popular approx crate. Approximate floating point equality comparisons and assertions for the Rust Programming Language.

Replace approx

To act as a drop-in replacement for approx, one can use the renaming option provided by cargo.

# Cargo.toml
[dependencies]
approx = { package = "approxim", version = "CURRENT_VERSION" }

Note that no further changes are required. Derive macros should also work this this workaround.

Dependencies

~2.2–3MB
~68K SLoC