This assertion will always fail (since `res` is not NaN inside here, and, anyway, NAN is not equal to every other value). The test should just be

```rust
let res = [f64::INFINITY, f64::NEG_INFINITY, f64::NAN].sum();
assert!(res.is_nan());
```