Registry / testing / assert-float-eq

assert-float-eq

JSON →
library1.2.0rscratesunverified

Assertions for floating-point equality.

testing
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

use assert_float_eq::assert_float_eq;

Asserts that two floating-point numbers are approximately equal within a tolerance.

use assert_float_eq::assert_float_eq; fn main() { let a = 1.0f64; let b = 1.0000000001; assert_float_eq!(a, b, r2nd <= 1e-6); println!("Floats are approximately equal"); }
Debug
Known footguns
gotchaRequires explicit tolerance specification; default may be too strict.
Upgrade
Version history

Breaking-change detection hasn't run for this library yet.

Audit
Security & dependencies

CVE tracking and dependency tree are planned for a later release.

Agent activity
11 hits · last 30 days
gptbot
3
claudebot
3
Resources