From 3c7a4297f5ef35369afeb988b3508089182aaabd Mon Sep 17 00:00:00 2001 From: "Christoph J. Scherr" Date: Mon, 15 Jan 2024 16:38:23 +0100 Subject: [PATCH] moar revsqrt basic tests --- members/revsqrt/tests/features/book/revsqrt.feature | 3 +++ members/revsqrt/tests/revsqrt.rs | 8 ++++---- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/members/revsqrt/tests/features/book/revsqrt.feature b/members/revsqrt/tests/features/book/revsqrt.feature index c44302e..055c6df 100644 --- a/members/revsqrt/tests/features/book/revsqrt.feature +++ b/members/revsqrt/tests/features/book/revsqrt.feature @@ -62,7 +62,10 @@ Feature: inverted square root calculation Given the number n | n | | 1 | + | 0.9 | | 1.0001 | + | 1.1001 | + | 1.1050 | | 0.999 | | 0.9999999999 | Then they are about the same diff --git a/members/revsqrt/tests/revsqrt.rs b/members/revsqrt/tests/revsqrt.rs index 28f9258..a4a8521 100644 --- a/members/revsqrt/tests/revsqrt.rs +++ b/members/revsqrt/tests/revsqrt.rs @@ -14,10 +14,10 @@ pub struct NumWorld { // a thought of me at least? #[inline] fn about_same(n: f32, m: f32) -> bool { - dbg!((n, m)); - dbg!((n - m).abs()); - dbg!(calc_gate(n, m)); - dbg!((n - m).abs() < calc_gate(n, m)); + // dbg!((n, m)); + // dbg!((n - m).abs()); + // dbg!(calc_gate(n, m)); + // dbg!((n - m).abs() < calc_gate(n, m)); (n - m).abs() <= calc_gate(n, m) }