()
| 390 | |
| 391 | #[test] |
| 392 | fn simple_aggregate() { |
| 393 | let values = [1.0, 2.0, 3.0, 4.0, 5.0]; |
| 394 | let result = aggregate_f64(&values); |
| 395 | assert_eq!(result.count, 5); |
| 396 | assert!((result.sum - 15.0).abs() < f64::EPSILON); |
| 397 | assert!((result.min - 1.0).abs() < f64::EPSILON); |
| 398 | assert!((result.max - 5.0).abs() < f64::EPSILON); |
| 399 | assert!((result.avg() - 3.0).abs() < f64::EPSILON); |
| 400 | assert!((result.first - 1.0).abs() < f64::EPSILON); |
| 401 | assert!((result.last - 5.0).abs() < f64::EPSILON); |
| 402 | } |
| 403 | |
| 404 | #[test] |
| 405 | fn kahan_accuracy() { |
nothing calls this directly
no test coverage detected