Skip to content

Commit

Permalink
updated rest-t501 error tol (#1378)
Browse files Browse the repository at this point in the history
  • Loading branch information
rezgarshakeri authored Oct 13, 2023
1 parent 0ef64b8 commit 4b61a5a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion rust/libceed/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1234,7 +1234,7 @@ mod tests {
let sum: Scalar = v.view()?.iter().sum();
let error: Scalar = (sum - 2.0).abs();
assert!(
error < 1e-15,
error < 50.0 * EPSILON,
"Incorrect interval length computed. Expected: 2.0, Found: {}, Error: {:.12e}",
sum,
error
Expand Down
7 changes: 5 additions & 2 deletions rust/libceed/src/operator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -652,9 +652,12 @@ impl<'a> Operator<'a> {
///
/// // Check
/// let sum: Scalar = v.view()?.iter().sum();
/// let error: Scalar = (sum - 2.0).abs();
/// assert!(
/// (sum - 2.0).abs() < 10.0 * libceed::EPSILON,
/// "Incorrect interval length computed"
/// error < 50.0 * libceed::EPSILON,
/// "Incorrect interval length computed. Expected: 2.0, Found: {}, Error: {:.12e}",
/// sum,
/// error
/// );
/// # Ok(())
/// # }
Expand Down

0 comments on commit 4b61a5a

Please sign in to comment.