From 79fa9f528e87b5e0845f8d7e5b8e13a9e4f34049 Mon Sep 17 00:00:00 2001 From: stevenj Date: Mon, 27 Aug 2012 13:53:59 -0400 Subject: [PATCH] cobyla should return ROUNDOFF_LIMITED if it "converges" to zero x tolerance, rather than XTOL_REACHED; thanks to David Liu for the bug report Ignore-this: c5ac800405beb77a0b18a7ba8f20a4a4 darcs-hash:20120827175359-c8de0-1ee07387d0560bde56d8de9315c20b03e4fea186.gz --- cobyla/cobyla.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cobyla/cobyla.c b/cobyla/cobyla.c index 763e01c..bb3066b 100644 --- a/cobyla/cobyla.c +++ b/cobyla/cobyla.c @@ -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. */ -- 2.30.2