diff --git a/src/camp_solver.c b/src/camp_solver.c index 1b7454e89..c52ef3c78 100644 --- a/src/camp_solver.c +++ b/src/camp_solver.c @@ -1355,7 +1355,7 @@ int guess_helper(const realtype t_n, const realtype h_n, N_Vector y_n, // Scale incomplete jumps if (i_fast >= 0 && h_n > ZERO) - h_j *= 0.95 + 0.1 * rand() / (double)RAND_MAX; + h_j *= 0.95 + 0.1 * iter / (double)GUESS_MAX_ITER; h_j = t_n < t_0 + t_j + h_j ? t_n - (t_0 + t_j) : h_j; // Only make small changes to adjustment vectors used in Newton iteration