chiark
/
gitweb
/
~ianmdlvl
/
nlopt.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
work around NaN in cobyla that occurs if we run it for too many iterations past the...
[nlopt.git]
/
cobyla
/
cobyla.c
diff --git
a/cobyla/cobyla.c
b/cobyla/cobyla.c
index d3d1db1186c8b209aaa5b27d4b7d9ee1c89c3a5f..9a669bdd691a282dcb340fe8752eb9a3e8cc247f 100644
(file)
--- a/
cobyla/cobyla.c
+++ b/
cobyla/cobyla.c
@@
-533,7
+533,7
@@
L140:
temp += -1.;
}
i__3 = *n;
- for (k = 1; k <= i__3; ++k) {
+ for (k = 1; k <= i__3; ++k)
if (sim[k + j * sim_dim1] != 0)
{
temp += simi[i__ + k * simi_dim1] * sim[k + j * sim_dim1];
}
d__1 = error, d__2 = abs(temp);