Registry / testing / approx-eq

approx-eq

JSON →
library0.1.8rscratesunverified

A macro for comparing equality of two values up to an arbitrary error in the relative difference.

# Cargo.toml [dependencies] approx_eq = "0.1.8"
INSTALL
IMPORT
SIG · APPROX-EQ
A
approx-eq
testingrustv0.1.8
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.

approx_eq
✓ use approx_eq::approx_eq;

Compare two floating-point values with a relative error tolerance.

use approx_eq::approx_eq; fn main() { let a = 1.0001; let b = 1.0002; if approx_eq!(f64, a, b, epsilon = 0.001) { println!("Values are approximately equal"); } }
Debug
Known issues

No known issues recorded.

Upgrade
Version history
0.1.8latest on crates.io
Audit
Dependencies

No dependency data recorded yet.

Agent activity
40 hits · last 30 days
node
34
OpenAI (training)
1
Resources