From 7a61e79757306ddadcffa3a333518ed0856c2f93 Mon Sep 17 00:00:00 2001 From: Josh Stone Date: Fri, 30 Aug 2019 15:24:38 -0700 Subject: [PATCH] Relax EPSILON comparisons in mul_add tests --- src/ops/mul_add.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ops/mul_add.rs b/src/ops/mul_add.rs index 6e43f2f..1e6bfeb 100644 --- a/src/ops/mul_add.rs +++ b/src/ops/mul_add.rs @@ -18,7 +18,7 @@ /// // 100.0 /// let abs_difference = (m.mul_add(x, b) - (m*x + b)).abs(); /// -/// assert!(abs_difference <= f32::EPSILON); +/// assert!(abs_difference <= 100.0 * f32::EPSILON); /// ``` pub trait MulAdd { /// The resulting type after applying the fused multiply-add. @@ -140,7 +140,7 @@ mod tests { let abs_difference = (MulAdd::mul_add(m, x, b) - (m*x + b)).abs(); - assert!(abs_difference <= $t::EPSILON); + assert!(abs_difference <= 46.4 * $t::EPSILON); } )+ };