use proper implementation of cos to check against

This commit is contained in:
Corwin 2023-10-08 14:56:32 +01:00
parent 548dd9ff67
commit e894367c52
No known key found for this signature in database

View file

@ -1230,7 +1230,10 @@ mod tests {
#[test] #[test]
fn check_cos_accuracy() { fn check_cos_accuracy() {
let n: Num<i32, 8> = Num::new(1) / 32; let n: Num<i32, 8> = Num::new(1) / 32;
assert_eq!(n.cos(), num!(0.9808)); assert_eq!(
n.cos(),
Num::from_f64((2. * core::f64::consts::PI / 32.).cos())
);
} }
#[test] #[test]