From 9a397ea4198caab55e0e6ac2b68437fa5868060c Mon Sep 17 00:00:00 2001 From: LorrensP-2158466 Date: Sat, 8 Feb 2025 14:27:11 +0100 Subject: [PATCH] macros... --- tests/pass/float.rs | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/tests/pass/float.rs b/tests/pass/float.rs index f38483011e..abd44fccee 100644 --- a/tests/pass/float.rs +++ b/tests/pass/float.rs @@ -12,9 +12,6 @@ use std::fmt::{Debug, Display, LowerHex}; use std::hint::black_box; use std::{f32, f64}; -// accept up to 64ULP (16ULP for host floats and 16ULP for artificial error and 32 for any rounding errors) -const ALLOWED_ULP_DIFF: i128 = 64; - /// Another form of checking if 2 floating point numbers are almost equal to eachother /// Using `a` and `b` as floating point numbers: /// @@ -74,7 +71,8 @@ macro_rules! assert_approx_eq { }}; ($a:expr, $b: expr) => { - assert_approx_eq!($a, $b, ALLOWED_ULP_DIFF); + // accept up to 64ULP (16ULP for host floats and 16ULP for artificial error and 32 for any rounding errors) + assert_approx_eq!($a, $b, 64); // in macro because of type-checking }; }