Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

changed BUFFER_SIZE to usize (cf. #49) #52

Merged
merged 6 commits into from
Nov 17, 2021
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/node/iir_filter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -647,6 +647,6 @@ mod test {

let min_len = min(data_ch.len(), ref_data_ch.len());

assert_float_eq!(data_ch[0..min_len], ref_data_ch[0..min_len], ulps_all <= 0);
assert_float_eq!(data_ch[0..min_len], ref_data_ch[0..min_len], ulps_all <= 4);
}
}
4 changes: 2 additions & 2 deletions src/node/oscillator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1520,12 +1520,12 @@ mod tests {
assert_float_eq!(
output.channel_data(0).as_slice(),
&ref_sine.data[..],
ulps_all <= 40
ulps_all <= 64
);
assert_float_eq!(
output.channel_data(1).as_slice(),
&ref_sine.data[..],
ulps_all <= 40
ulps_all <= 64
Comment on lines 1520 to +1528
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggestions:

  • Maybe we should switch to absolute tolerance comparison. ULP are difficult to reason about, and since we are using values from a small interval, absolute error should be fine.
  • Cherry pick this commit to make a separate PR

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is something I've noticed too. Sometimes tests on my machine fail with the current ulps_all margins.
I agree we should probably use absolute values for all integration/snapshot tests

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have created #53 for this

);
}

Expand Down