From: stevenj Date: Sun, 4 Apr 2010 20:31:47 +0000 (-0400) Subject: tweak initial step X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=commitdiff_plain;h=919ecd7d9e22ed76b07d3a7f4520a2dc8a40536c;p=nlopt.git tweak initial step darcs-hash:20100404203147-c8de0-fb83a312980103cc419a5542b2b20faa9a224518.gz --- diff --git a/api/options.c b/api/options.c index 4b0403e..18cdbd4 100644 --- a/api/options.c +++ b/api/options.c @@ -440,7 +440,7 @@ nlopt_result nlopt_set_default_initial_step(nlopt_opt opt, const double *x) step = (x[i] - lb[i]) * 1.1; } if (nlopt_isinf(step) || step == 0) { - step = fabs(x[i]) * 0.25; + step = x[i]; } if (nlopt_isinf(step) || step == 0) step = 1;