chiark
/
gitweb
/
~ianmdlvl
/
nlopt.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
bug fix in nlopt_set_lower_bounds1, thanks to @wojdyr
[nlopt.git]
/
api
/
options.c
diff --git
a/api/options.c
b/api/options.c
index b2ce5febb55fc73a7214c67a2f530c07047d11f9..626a38b8c04323f69ed2be1020a236a7587b3a68 100644
(file)
--- a/
api/options.c
+++ b/
api/options.c
@@
-287,8
+287,8
@@
NLOPT_STDCALL nlopt_set_lower_bounds1(nlopt_opt opt, double lb)
nlopt_unset_errmsg(opt);
if (opt) {
unsigned i;
- for (i = 0; i < opt->n; ++i)
- opt->lb[i] = lb;
{
+ for (i = 0; i < opt->n; ++i)
{
+ opt->lb[i] = lb;
if (opt->lb[i] < opt->ub[i] && nlopt_istiny(opt->ub[i] - opt->lb[i]))
opt->lb[i] = opt->ub[i];
}