Skip to content
Snippets Groups Projects
Commit 73fae11f authored by Elias Pipping's avatar Elias Pipping Committed by Elias Pipping
Browse files

More meaningful assertion

parent c87853f6
Branches
No related tags found
No related merge requests found
......@@ -41,8 +41,7 @@ double compute_state_update_bisection(double h, double unorm, double L,
double compute_state_update(double h, double unorm, double L,
double old_state) {
double ret1 = compute_state_update_bisection(h, unorm, L, old_state);
assert(std::abs(1.0 / h * ret1 - (old_state - unorm / L) / h -
std::exp(-ret1)) < 1e-8);
assert(std::abs(ret1 - old_state + unorm / L - h * std::exp(-ret1)) < 1e-10);
return ret1;
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment