better NAN prevention
This commit is contained in:
parent
52cbb88a6d
commit
6a6d6c1270
1 changed files with 4 additions and 1 deletions
|
@ -131,7 +131,10 @@ fn parse_and_compile(opts: &PlayOpts) -> anyhow::Result<Vec<f64>> {
|
|||
.compile_all(tokens)
|
||||
.inspect(|v| {
|
||||
for sample in v {
|
||||
assert_ne!(&f64::NAN, sample, "Waiter! There's a NaN in my samples!");
|
||||
assert!(
|
||||
!sample.abs().is_nan(),
|
||||
"Waiter! There's a NaN in my samples!"
|
||||
);
|
||||
}
|
||||
})
|
||||
.context("Failed to process input tokens")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue