chiark / gitweb /
cobyla should return ROUNDOFF_LIMITED if it "converges" to zero x tolerance, rather...
authorstevenj <stevenj@alum.mit.edu>
Mon, 27 Aug 2012 17:53:59 +0000 (13:53 -0400)
committerstevenj <stevenj@alum.mit.edu>
Mon, 27 Aug 2012 17:53:59 +0000 (13:53 -0400)
Ignore-this: c5ac800405beb77a0b18a7ba8f20a4a4

darcs-hash:20120827175359-c8de0-1ee07387d0560bde56d8de9315c20b03e4fea186.gz

cobyla/cobyla.c

index 763e01cbba52e1a89805cbd12b1b21fc8a8b5404..bb3066b8f3c478340c59fed31ff9f872fb2332eb 100644 (file)
@@ -1193,8 +1193,8 @@ L550:
     }
     goto L140;
   }
-  else
-       rc = NLOPT_XTOL_REACHED;
+  else /* rho <= rhoend */
+       rc = rhoend > 0 ? NLOPT_XTOL_REACHED : NLOPT_ROUNDOFF_LIMITED;
 
 /* Return the best calculated values of the variables. */