# HG changeset patch # User jwe # Date 927986536 0 # Node ID 7f8827f4040a333253cd8f7deac680d2395a47c5 # Parent dd00769643ae90758608ae5c11b69b3b09f92bee [project @ 1999-05-29 14:01:55 by jwe] diff --git a/src/ChangeLog b/src/ChangeLog --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +Fri May 28 11:02:37 1999 John W. Eaton + + * DLD-FUNCTIONS/chol.cc (Fchol): If two output arguments, never + produce error message. + Thu May 27 18:28:35 1999 John W. Eaton * DLD-FUNCTIONS/chol.cc (Fchol): Also return info as second output. diff --git a/src/DLD-FUNCTIONS/chol.cc b/src/DLD-FUNCTIONS/chol.cc --- a/src/DLD-FUNCTIONS/chol.cc +++ b/src/DLD-FUNCTIONS/chol.cc @@ -66,13 +66,13 @@ { int info; CHOL fact (m, info); - if (info != 0) - error ("chol: matrix not positive definite"); - else + if (nargout == 2 || info == 0) { retval(1) = static_cast (info); retval(0) = fact.chol_matrix (); } + else + error ("chol: matrix not positive definite"); } } else if (arg.is_complex_type ()) @@ -83,13 +83,13 @@ { int info; ComplexCHOL fact (m, info); - if (info != 0) - error ("chol: matrix not positive definite"); - else + if (nargout == 2 || info == 0) { retval(1) = static_cast (info); retval(0) = fact.chol_matrix (); } + else + error ("chol: matrix not positive definite"); } } else