gnudatalanguage / gdl

GDL - GNU Data Language
GNU General Public License v2.0
274 stars 61 forks source link

In INVERT, when status is not OK, don't return a matrix ... #1722

Open alaingdl opened 8 months ago

alaingdl commented 8 months ago

This problem was issued due to tests related to LUDC #1700

(for the record, in GDL if compiled with Eigen, two algorithms are available : GSL & Eigen , selectable by keywords)

GDL> #invert
Internal FUNCTION : res=INVERT([2 Args],DOUBLE,GSL,EIGEN)

In fact the situation is more complex, it seems that when we provide a "status" the GSL part is used, but without Eigen is used and return anything (bad)

In any case this should be clarify.

GDL> print, invert(fltarr(3,3), st)
% GSL Error #1: matrix is singular
% Execution halted at: $MAIN$          
GDL> st
           1
GDL> print, invert(fltarr(3,3))
 -4.72668e-34  3.08594e-41      0.00000
      0.00000 -2.59011e+24  3.08552e-41
 -2.59011e+24  3.08552e-41      0.00000