diff --git a/tests/li.rs b/tests/li.rs index 568283b..2edd4d7 100644 --- a/tests/li.rs +++ b/tests/li.rs @@ -57,6 +57,6 @@ fn test_values() { // test value that causes overflow if squared assert!(!Complex::new(1e300, 1.0).li(7).is_infinite()); assert!(!Complex::new(1.0, 1e300).li(7).is_infinite()); - assert_eq_float!(Complex::new(1e300, 1.0).li(7).re, Complex::new(-1.4886831990993457e16, -4.74066248802866e14).re, 1e-15); - assert_eq_float!(Complex::new(1.0, 1e300).li(7).re, Complex::new(-1.489168315226607e16, 2.3705150998401e14).re, 1e-5); + assert_eq_complex!(Complex::new(1e300, 1.0).li(7), Complex::new(-1.4886831990993457e16, 4.74066248802866e14), 1e-15); + assert_eq_complex!(Complex::new(1.0, 1e300).li(7), Complex::new(-1.489168315226607e16, 2.3705150998401e14), 1e-5); } diff --git a/tests/li0.rs b/tests/li0.rs index 9b3f71e..0cb4dbb 100644 --- a/tests/li0.rs +++ b/tests/li0.rs @@ -25,6 +25,6 @@ fn test_values() { // test value that causes overflow if squared assert!(!Complex::new(1e300, 1.0).li0().is_infinite()); assert!(!Complex::new(1.0, 1e300).li0().is_infinite()); - assert_eq_float!(Complex::new(1e300, 1.0).li0().re, -1.0, eps); - assert_eq_float!(Complex::new(1.0, 1e300).li0().re, -1.0, eps); + assert_eq_complex!(Complex::new(1e300, 1.0).li0(), Complex::new(-1.0, 0.0), eps); + assert_eq_complex!(Complex::new(1.0, 1e300).li0(), Complex::new(-1.0, 0.0), eps); } diff --git a/tests/li1.rs b/tests/li1.rs index cb0e1ba..049a05a 100644 --- a/tests/li1.rs +++ b/tests/li1.rs @@ -25,6 +25,6 @@ fn test_values() { // test value that causes overflow if squared assert!(!Complex::new(1e300, 1.0).li1().is_infinite()); assert!(!Complex::new(1.0, 1e300).li1().is_infinite()); - assert_eq_float!(Complex::new(1e300, 1.0).li1().re, Complex::new(-690.77552789821371, -3.14159265358979).re, eps); - assert_eq_float!(Complex::new(1.0, 1e300).li1().re, Complex::new(-690.77552789821371, 1.5707963267948966).re, eps); + assert_eq_complex!(Complex::new(1e300, 1.0).li1(), Complex::new(-690.77552789821371, 3.14159265358979), eps); + assert_eq_complex!(Complex::new(1.0, 1e300).li1(), Complex::new(-690.77552789821371, 1.5707963267948966), eps); } diff --git a/tests/li2.rs b/tests/li2.rs index ef1ca3e..5d16a7f 100644 --- a/tests/li2.rs +++ b/tests/li2.rs @@ -91,8 +91,8 @@ fn special_values() { // test value that causes overflow if squared assert!(!Complex::new(1e300, 1.0).li2().is_infinite()); assert!(!Complex::new(1.0, 1e300).li2().is_infinite()); - assert_eq_float!(Complex::new(1e300, 1.0).li2().re, Complex::new(-238582.12510339421, -2170.13532372464).re, eps); - assert_eq_float!(Complex::new(1.0, 1e300).li2().re, Complex::new(-238585.82620504462, 1085.06766186232).re, eps); + assert_eq_complex!(Complex::new(1e300, 1.0).li2(), Complex::new(-238582.12510339421, 2170.13532372464), eps); + assert_eq_complex!(Complex::new(1.0, 1e300).li2(), Complex::new(-238585.82620504462, 1085.06766186232), eps); } diff --git a/tests/li3.rs b/tests/li3.rs index 642d280..4866f74 100644 --- a/tests/li3.rs +++ b/tests/li3.rs @@ -59,8 +59,8 @@ fn special_values() { // test value that causes overflow if squared assert!(!Complex::new(1e300, 1.0).li3().is_infinite()); assert!(!Complex::new(1.0, 1e300).li3().is_infinite()); - assert_eq_float!(Complex::new(1e300, 1.0).li3().re, Complex::new(-5.4934049431527088e7, -749538.186928224).re, eps); - assert_eq_float!(Complex::new(1.0, 1e300).li3().re, Complex::new(-5.4936606061973454e7, 374771.031356405).re, eps); + assert_eq_complex!(Complex::new(1e300, 1.0).li3(), Complex::new(-5.4934049431527088e7, 749538.186928224), eps); + assert_eq_complex!(Complex::new(1.0, 1e300).li3(), Complex::new(-5.4936606061973454e7, 374771.031356405), eps); } diff --git a/tests/li4.rs b/tests/li4.rs index abb8038..bf15145 100644 --- a/tests/li4.rs +++ b/tests/li4.rs @@ -24,8 +24,8 @@ fn special_values() { // test value that causes overflow if squared assert!(!Complex::new(1e300, 1.0).li4().is_infinite()); assert!(!Complex::new(1.0, 1e300).li4().is_infinite()); - assert_eq_float!(Complex::new(1e300, 1.0).li4().re, Complex::new(-9.4863817894708364e9, -1.725875455850714e8).re, eps); - assert_eq_float!(Complex::new(1.0, 1e300).li4().re, Complex::new(-9.4872648206269765e9, 8.62951114411071e7).re, eps); + assert_eq_complex!(Complex::new(1e300, 1.0).li4(), Complex::new(-9.4863817894708364e9, 1.725875455850714e8), eps); + assert_eq_complex!(Complex::new(1.0, 1e300).li4(), Complex::new(-9.4872648206269765e9, 8.62951114411071e7), eps); } diff --git a/tests/li5.rs b/tests/li5.rs index 55ff947..9ddb9aa 100644 --- a/tests/li5.rs +++ b/tests/li5.rs @@ -24,8 +24,8 @@ fn special_values() { // test value that causes overflow if squared assert!(!Complex::new(1e300, 1.0).li5().is_infinite()); assert!(!Complex::new(1.0, 1e300).li5().is_infinite()); - assert_eq_float!(Complex::new(1e300, 1.0).li5().re, Complex::new(-1.3105197831948743e12, -2.980481322754618e10).re, eps); - assert_eq_float!(Complex::new(1.0, 1e300).li5().re, Complex::new(-1.31072310968392418e12, 1.490286896860219e10).re, eps); + assert_eq_complex!(Complex::new(1e300, 1.0).li5(), Complex::new(-1.3105197831948743e12, 2.980481322754618e10), eps); + assert_eq_complex!(Complex::new(1.0, 1e300).li5(), Complex::new(-1.31072310968392418e12, 1.490286896860219e10), eps); } diff --git a/tests/li6.rs b/tests/li6.rs index 91e7bef..1a12ae6 100644 --- a/tests/li6.rs +++ b/tests/li6.rs @@ -24,8 +24,8 @@ fn special_values() { // test value that causes overflow if squared assert!(!Complex::new(1e300, 1.0).li6().is_infinite()); assert!(!Complex::new(1.0, 1e300).li6().is_infinite()); - assert_eq_float!(Complex::new(1e300, 1.0).li6().re, Complex::new(-1.5086876165613597e14, -4.11768711823317e12).re, eps); - assert_eq_float!(Complex::new(1.0, 1e300).li6().re, Complex::new(-1.5090387516918862e14, 2.0589500211678e12).re, eps); + assert_eq_complex!(Complex::new(1e300, 1.0).li6(), Complex::new(-1.5086876165613597e14, 4.11768711823317e12), 2.0*eps); + assert_eq_complex!(Complex::new(1.0, 1e300).li6(), Complex::new(-1.5090387516918862e14, 2.0589500211678e12), 2.0*eps); }