Mercurial > hg > octave-nkf
diff liboctave/DASSL.cc @ 4043:6fae69a1796e
[project @ 2002-08-15 03:36:27 by jwe]
author | jwe |
---|---|
date | Thu, 15 Aug 2002 03:36:27 +0000 |
parents | f6df65db67f9 |
children | 7b0c139ac8af |
line wrap: on
line diff
--- a/liboctave/DASSL.cc +++ b/liboctave/DASSL.cc @@ -31,6 +31,8 @@ #include <cfloat> #include <cmath> +#include <strstream> + #include "DASSL.h" #include "f77-fcn.h" #include "lo-error.h" @@ -481,6 +483,12 @@ { std::string retval; + std::ostrstream buf; + buf << t << ends; + const char *t = buf.str (); + std::string t_curr = t; + delete [] t; + switch (istate) { case 1: @@ -496,7 +504,8 @@ break; case -1: - retval = "a large amount of work has been expended"; + retval = std::string ("a large amount of work has been expended (t =") + + t_curr + ")"; break; case -2: @@ -504,32 +513,39 @@ break; case -3: - retval = "error weight became zero during problem.\ - (solution component i vanished, and atol or atol(i) == 0)"; + retval = std::string ("error weight became zero during problem. (t = ") + + t_curr + + "; solution component i vanished, and atol or atol(i) == 0)"; break; case -6: - retval = "repeated error test failures on the last attempted step"; + retval = std::string ("repeated error test failures on the last attempted step (t = ") + + t_curr + ")"; break; case -7: - retval = "the corrector could not converge"; + retval = std::string ("the corrector could not converge (t = ") + + t_curr + ")"; break; case -8: - retval = "the matrix of partial derivatives is singular"; + retval = std::string ("the matrix of partial derivatives is singular (t = ") + + t_curr + ")"; break; case -9: - retval = "the corrector could not converge (repeated test failures)"; + retval = std::string ("the corrector could not converge (t = ") + + t_curr + "; repeated test failures)"; break; case -10: - retval = "corrector could not converge because IRES was -1"; + retval = std::string ("corrector could not converge because IRES was -1 (t = ") + + t_curr + ")"; break; case -11: - retval = "return requested in user-supplied function"; + retval = std::string ("return requested in user-supplied function (t = ") + + t_curr + ")"; break; case -12: