diff options
author | Anton Khirnov <anton@khirnov.net> | 2020-01-30 13:22:46 +0100 |
---|---|---|
committer | Anton Khirnov <anton@khirnov.net> | 2020-01-30 13:22:46 +0100 |
commit | 80b9f98f2316b1d36f6409861cab6bcdddf23174 (patch) | |
tree | 914978bb2f88c7c14423022d6e31ca4d233127b2 | |
parent | c310aaf3cd960832ebea100d2e60b99cce5c5a07 (diff) |
nlsolve: take the absolute value of delta in the divergence check
Also, reduce the bound from 1e18 to 1e12 which should be sufficient for
most cases.
-rw-r--r-- | nlsolve.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -211,7 +211,7 @@ int tdi_nlsolve_solve(NLSolveContext *ctx, NLEqCallback eq_eval, ret = 0; goto finish; } else if ((fast_abort && fabs(s->delta[max_idx]) > 1e6) || - s->delta[max_idx] > 1e18) { + fabs(s->delta[max_idx]) > 1e12) { tdi_log(&ctx->logger, 2, "max(delta) %g, aborting\n", s->delta[max_idx]); ret = -EDOM; goto finish; |