From bug-octave-request at bevo dot che dot wisc dot edu Thu Jun 7 13:27:52 2001 Subject: Rcond=NAN in DET From: "Jianming" To: Date: Thu, 7 Jun 2001 13:27:44 -0500 This is a multi-part message in MIME format. ------=_NextPart_000_0015_01C0EE6B.ED773DA0 Content-Type: multipart/alternative; boundary="----=_NextPart_001_0016_01C0EE6B.ED773DA0" ------=_NextPart_001_0016_01C0EE6B.ED773DA0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Hi, =20 The following expression will cause octave 2.1.34 + atlas 3.2.1 to hang: C=3D[1, 1.30007902878166e-112, 1, 1; 9.2176458517918e-188, 1, 9.21764597429266e-188, = 9.21764617989136e-188; 1, 1.30007903363547e-112, 1, 1; 1, 1.30007904184461e-112, 1, 1]; [d r] =3D det(C); This is because the DEGCO returns rcond =3D NaN, but was not tested by = dMatrix.cc. The method determinant thus proceed to perform DGEDI, which = will hang. Attached is a patch which simply add the test condition xisnan(rcond). Regards, Jianming ------=_NextPart_000_0015_01C0EE6B.ED773DA0 Content-Type: application/octet-stream; name="det.patch" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="det.patch" --- octave-2.1.34.old/liboctave/dMatrix.cc Sat Apr 21 08:51:22 2001=0A= +++ octave-2.1.34/liboctave/dMatrix.cc Tue Jun 5 17:21:55 2001=0A= at @ -899,7 +899,7 @@ Matrix::determinant (int& info, double& =0A= {=0A= volatile double rcond_plus_one =3D rcond + 1.0;=0A= =0A= - if (rcond_plus_one =3D=3D 1.0)=0A= + if (rcond_plus_one =3D=3D 1.0 || xisnan(rcond))=0A= {=0A= info =3D -1;=0A= retval =3D DET ();=0A= ------=_NextPart_000_0015_01C0EE6B.ED773DA0-- _________________________________________________________ Do You Yahoo!? Get your free at yahoo dot com address at http://mail.yahoo.com ------------------------------------------------------------- Octave is freely available under the terms of the GNU GPL. Octave's home on the web: http://www.octave.org How to fund new projects: http://www.octave.org/funding.html Subscription information: http://www.octave.org/archive.html -------------------------------------------------------------