aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2020-08-26 16:45:08 +0200
committerAnton Khirnov <anton@khirnov.net>2020-08-26 16:45:39 +0200
commitac164e2c6a88ea527a7a9ae4da9e33fb1c06ec2c (patch)
tree71d1596c65f7436a636059420d434cce7e016049
parent7beb03aa1ed290f272a8128f7130253e95c9ca1a (diff)
Fix getting into upper branch with negative a.
-rw-r--r--init.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/init.c b/init.c
index 6467988..c5c633c 100644
--- a/init.c
+++ b/init.c
@@ -332,7 +332,7 @@ int td_solve(TDContext *td, double *coeffs_init[3])
"second branch where mass increases with decreasing amplitude\n",
td->amplitude, ce->a_converge);
}
- a0 = ce->a_converge;
+ a0 = SGN(td->amplitude) * ce->a_converge;
tdi_constraint_eval_free(&ce);
if (coeffs_init) {