Registry / testing / float-eq

float-eq

JSON →
library1.0.1rscratesunverified

Compare IEEE floating point primitives, structs and collections for equality with tolerance.

# Cargo.toml [dependencies] float_eq = "1.0.1"
INSTALL
IMPORT
SIG · FLOAT-EQ
F
float-eq
testingrustv1.0.1
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.

float_eq
use float_eq::float_eq;

Compares two floats with an absolute tolerance.

use float_eq::float_eq; fn main() { let a = 1.0f32; let b = 1.0000001f32; assert!(float_eq!(a, b, abs <= 0.0001)); println!("Floats are approximately equal"); }
Debug
Known issues

No known issues recorded.

Upgrade
Version history
1.0.1latest on crates.io
Audit
Dependencies

No dependency data recorded yet.

Agent activity
2 hits · last 30 days
node
2
Resources
float-eq — cargo add float-eq · libregistry