Module assert_f64

Source
Expand description

Assert for comparing floating-point 32-bit numbers within 2.0 * EPSILON.

These macros are available:

§Example

use assertables::*;

let a: f64 = 1.0 / 3.0;
let b: f64 = 0.3333333333333335;
assert_f64_eq!(a, b);

let a: f64 = 1.0 / 3.0;
let b: f64 = 0.3333333333333339;
assert_f64_ne!(a, b);

Modules§

assert_f64_eq
Assert a floating point 64-bit number is equal to another within f64::EPSILON.
assert_f64_ge
Assert a floating point 64-bit number is greater than or equal to another within f64::EPSILON.
assert_f64_gt
Assert a floating point 64-bit number is greater than another within f64::EPSILON.
assert_f64_le
Assert a floating point 64-bit number is equal to another within f64::EPSILON.
assert_f64_lt
Assert a floating point 64-bit number is less than another within f64::EPSILON.
assert_f64_ne
Assert a floating point 64-bit number is not equal to another within f64::EPSILON.