Registry / testing / float-cmp

float-cmp

JSON →
library0.10.0rscratesunverified

Traits for approximate comparison of floating-point numbers.

# Cargo.toml [dependencies] float-cmp = "0.10.0"
INSTALL
IMPORT
SIG · FLOAT-CMP
F
float-cmp
testingrustv0.10.0
harness data pending
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.

ApproxEq
✓ use float_cmp::ApproxEq;

Checks approximate equality of two floats with custom tolerance.

use float_cmp::ApproxEq; let a = 1.0000001_f64; let b = 1.0_f64; assert!(a.approx_eq(b, (0.0, 2))); // uses epsilon and ulps
Debug
Known issues

No known issues recorded.

Upgrade
Version history
0.10.0latest on crates.io
Audit
Dependencies

No dependency data recorded yet.

Agent activity
8 hits · last 30 days
node
6
Resources
float-cmp — cargo add float-cmp · libregistry