[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #60797] sqrtm: returns nan for matrix of ones
From: |
Dmitri A. Sergatskov |
Subject: |
[Octave-bug-tracker] [bug #60797] sqrtm: returns nan for matrix of ones with rows and columns >=4 |
Date: |
Tue, 16 Jan 2024 21:47:01 -0500 (EST) |
Follow-up Comment #8, bug#60797 (group octave):
Just to add some data point (ARM aarch64):
octave:1> sqrtm(ones(4))
warning: sqrtm: matrix is singular, may not have a square root
ans =
0.5000 + 0i 0.5000 + 0.0000i 0.5000 + 0.9692i 0.5000 - 0.9692i
0.5000 + 0i 0.5000 - 0.0000i 0.5000 - 0.3231i 0.5000 + 0.3231i
0.5000 + 0i 0.5000 - 0.0000i 0.5000 - 0.3231i 0.5000 + 0.3231i
0.5000 + 0i 0.5000 - 0.0000i 0.5000 - 0.3231i 0.5000 + 0.3231i
octave:2> ans^2
ans =
1.0000 - 0.0000i 1.0000 - 0.0000i 1.0000 + 0.0000i 1.0000 - 0.0000i
1.0000 + 0.0000i 1.0000 + 0.0000i 1.0000 + 0.0000i 1.0000 + 0.0000i
1.0000 + 0.0000i 1.0000 + 0.0000i 1.0000 + 0.0000i 1.0000 + 0.0000i
1.0000 + 0.0000i 1.0000 + 0.0000i 1.0000 + 0.0000i 1.0000 + 0.0000i
octave:3> test sqrtm.cc-tst
warning: sqrtm: matrix is singular, may not have a square root
warning: called from
__test__ at line 2 column 1
test at line 682 column 11
PASSES 4 out of 4 tests
octave:4> version -hgid
ans = 038fd58e257e
Dmitri.
--
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/bugs/?60797>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/
Message not available