Skip to content

Commit

Permalink
increase test precision
Browse files Browse the repository at this point in the history
  • Loading branch information
Expander committed Jan 26, 2024
1 parent f729e20 commit 4002798
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/cln.rs
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ fn test_cln() {
let x32 = Complex::new(1.0_f32, 0.0_f32);
let x64 = Complex::new(1.0_f64, 0.0_f64);

assert!(((-x32).cln() - Complex::new(0.0_f32, std::f32::consts::PI)).norm() < 5.0_f32*std::f32::EPSILON);
assert!(((-x32).ln() - Complex::new(0.0_f32, -std::f32::consts::PI)).norm() < 5.0_f32*std::f32::EPSILON);
assert!(((-x32).cln() - Complex::new(0.0_f32, std::f32::consts::PI)).norm() < 2.0_f32*std::f32::EPSILON);
assert!(((-x32).ln() - Complex::new(0.0_f32, -std::f32::consts::PI)).norm() < 2.0_f32*std::f32::EPSILON);
assert!((-x64).cln() == Complex::new(0.0_f64, std::f64::consts::PI));
assert!((-x64).ln() == Complex::new(0.0_f64, -std::f64::consts::PI));
}

0 comments on commit 4002798

Please sign in to comment.