moar revsqrt basic tests
Cargo Check, Format, Fix and Test / cargo CI (push) Successful in 2m12s Details

This commit is contained in:
Christoph J. Scherr 2024-01-15 16:38:23 +01:00
parent 14263cd6b2
commit 3c7a4297f5
Signed by: cscherrNT
GPG Key ID: 8E2B45BC51A27EA7
2 changed files with 7 additions and 4 deletions

View File

@ -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

View File

@ -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)
}