On Tue, Mar 25, 2025 at 10:52 AM Riccardo (Jack) Lucchetti
<p002264(a)staff.univpm.it> wrote:
On 25/03/2025 15:46, Sven Schreiber wrote:
>
> consider this with gretl 2025a:
>
> <console>
> ? matrix hello = {1/0} # to get invalid input
> ? = eigensym(hello)
> Not a Number geschah bei Berechnung
> ? = eigen(hello)
> 1.#INF
> ? = svd(hello)
> nan
> </console>
>
> So we have everything: a hard-stopping error, some IEEE code (?), and a
> gretl code. Plus, with a 6x6 matrix input I also saw that eigen() spat
> out a "Data error".
Ouch
> I think it would be good if this could be a little harmonized, no?
Is it even possible to do without breaking backwards compatibility? I we
don't care about that, I'd favour stopping with an error rather than
returning NAs (FWIW, stopping with an error is what both Octave and R do).
A couple of comments. First "1.#INF" is Microsoft-specific, other
operating systems would just say "inf" or "-inf". Second, I
wouldn't
rush to make this sort of thing a hard error in all cases. What about
matrix results that contain some nans or infs along with valid values?
But there's clearly an inconsistency between svd() and eigensym() that
should be resolved one way or another.
Allin