From ac164e2c6a88ea527a7a9ae4da9e33fb1c06ec2c Mon Sep 17 00:00:00 2001 From: Anton Khirnov Date: Wed, 26 Aug 2020 16:45:08 +0200 Subject: Fix getting into upper branch with negative a. --- init.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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) { -- cgit v1.2.3