File: relax_test

package info (click to toggle)
rust-roots 0.0.8-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 348 kB
  • sloc: makefile: 4
file content (15 lines) | stat: -rw-r--r-- 727 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
From: Michael R. Crusoe <crusoe@debian.org>
Subject: Adjust test for i386
Forwarded: https://github.com/vorot/roots/pull/34
--- roots.orig/src/numerical/eigen.rs
+++ roots/src/numerical/eigen.rs
@@ -725,7 +725,7 @@
         // (According to Wolfram Alpha, roots must be -1.1016116464173349f64, 0.9682783130840016f64)
         // This means that this function cannot handle such small discriminant.
         // But at least it finds the right number of them.
-        assert_eq!(roots[0], 0.9990584398692597f64);
-        assert_eq!(roots[1], 0.12511486301943303f64);
+        assert_float_eq!(1e-14f64, roots[0], 0.9990584398692597f64);
+        assert_float_eq!(1e-14f64, roots[1], 0.12511486301943303f64);
     }
 }