[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #63911] hilbert crash
From: |
John W. Eaton |
Subject: |
[Octave-bug-tracker] [bug #63911] hilbert crash |
Date: |
Mon, 13 Mar 2023 18:02:33 -0400 (EDT) |
Follow-up Comment #4, bug #63911 (project octave):
I see the following on a system with enough memory available to handle this
calculation. Note that direct calculation of inv(hilb(50000)) fails with a
singular matrix error, and invhilb (50000) is garbage because the elements
become Inf (only 870 elements are *not* Inf). But I don't see any crash.
octave:5> x = hilb (50000);
octave:6> y = inv (x);
warning: matrix singular to machine precision, rcond = 9.02849e-26
octave:7> y = invhilb (50000);
octave:8> size (x)
ans =
50000 50000
octave:9> size (y)
ans =
50000 50000
octave:10> xy = x * y;
octave:11> size (xy)
ans =
50000 50000
octave:12> xy (1:5, 1:5)
ans =
NaN NaN NaN NaN NaN
NaN NaN NaN NaN NaN
NaN NaN NaN NaN NaN
NaN NaN NaN NaN NaN
NaN NaN NaN NaN NaN
octave:13> y (1:5, 1:5)
ans =
2.5000e+09 -3.1250e+18 1.3021e+27 -2.7127e+35 3.3908e+43
-3.1250e+18 5.2083e+27 -2.4414e+36 5.4253e+44 -7.0643e+52
1.3021e+27 -2.4414e+36 1.2207e+45 -2.8257e+53 3.7844e+61
-2.7127e+35 5.4253e+44 -2.8257e+53 6.7279e+61 -9.1982e+69
3.3908e+43 -7.0643e+52 3.7844e+61 -9.1982e+69 1.2775e+78
octave:14> sum (isnan (xy(:)))
ans = 2.5000e+09
octave:15> sum (isnan (y(:)))
ans = 0
octave:16> sum (isinf (y(:)))
ans = 2.5000e+09
octave:17> sum (isinf (x(:)))
ans = 0
octave:18> y(end-10:end,end-10:end)
ans =
Inf -Inf Inf -Inf Inf -Inf Inf -Inf Inf -Inf Inf
-Inf Inf -Inf Inf -Inf Inf -Inf Inf -Inf Inf -Inf
Inf -Inf Inf -Inf Inf -Inf Inf -Inf Inf -Inf Inf
-Inf Inf -Inf Inf -Inf Inf -Inf Inf -Inf Inf -Inf
Inf -Inf Inf -Inf Inf -Inf Inf -Inf Inf -Inf Inf
-Inf Inf -Inf Inf -Inf Inf -Inf Inf -Inf Inf -Inf
Inf -Inf Inf -Inf Inf -Inf Inf -Inf Inf -Inf Inf
-Inf Inf -Inf Inf -Inf Inf -Inf Inf -Inf Inf -Inf
Inf -Inf Inf -Inf Inf -Inf Inf -Inf Inf -Inf Inf
-Inf Inf -Inf Inf -Inf Inf -Inf Inf -Inf Inf -Inf
Inf -Inf Inf -Inf Inf -Inf Inf -Inf Inf -Inf Inf
octave:19> sum (!isinf (y(:)))
ans = 870
By "crash" what does the OP mean? An error message? I would expect that on a
system with insufficient memory, so that's not a bug. Or a segfault or some
other thing that causes Octave to exit? That might be a bug. But without
more info, I agree we should close this report as invalid.
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/bugs/?63911>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/