|
From: | anonymous |
Subject: | [Octave-bug-tracker] [bug #60738] logm returning incorrect result with some real non-symmetric matrices |
Date: | Fri, 18 Jun 2021 04:28:09 -0400 (EDT) |
User-agent: | Mozilla/5.0 (Windows NT 6.3; Win64; x64; rv:89.0) Gecko/20100101 Firefox/89.0 |
Follow-up Comment #11, bug #60738 (project octave): Attached new patch for logm incorporating the speed up and the .m file in case it does not work. The patch modifies the file after the updates you pushed earlier. logm of ones(4) is likely to be different on each implementation as all of the eigenvalues excluding one will be zero and the log of zero is -inf. I chose -log(realmax()) for negative inf to try to avoid inf in the matrix. I tried to test the c++ of the sqrtm file but failing. I think the line should be element_type colji=colj[i]; if (colj[i] != zero){ colji = colj[i] /= (coli[i] + colj[j]); } to fix the nan issue with sqrtm(ones(4)) (file #51580, file #51581) _______________________________________________________ Additional Item Attachment: File name: bug60738logm v2.patch Size:2 KB <https://file.savannah.gnu.org/file/bug60738logm v2.patch?file_id=51580> File name: logm.m Size:6 KB <https://file.savannah.gnu.org/file/logm.m?file_id=51581> _______________________________________________________ Reply to this item at: <https://savannah.gnu.org/bugs/?60738> _______________________________________________ Message sent via Savannah https://savannah.gnu.org/
[Prev in Thread] | Current Thread | [Next in Thread] |