M2 icon indicating copy to clipboard operation
M2 copied to clipboard

LUdecomposition incorrect?

Open LukeOeding opened this issue 2 years ago • 9 comments

I noticed an error in the output of LUdecomposition. Here is my MnWE:

K =  matrix {{1, 1, 0, 0}, {0, 0, 1, 0}, {0, 0, 0, 1}, {0, 0, 1, 1}}
(P, L, U) = LUdecomposition ( sub (K,QQ)    )
Q = id_(QQ^4)_P
Q*L*U == K

Not sure the implications of this, or how often this function is actually used.

LukeOeding avatar Oct 23 '23 18:10 LukeOeding

Thanks! I'll take a look.

mikestillman avatar Oct 23 '23 19:10 mikestillman

Is it related to https://github.com/Macaulay2/M2/issues/2941#issue-1920588919? I tried to track down the error there and I wasn't sure if LU decomposition was called there as well

davikrehalt avatar Oct 26 '23 14:10 davikrehalt

Looking at the high-level documentation, it doesn't look like LUdecomposition is implemented for QQ as it only supports matrices over ZZ/p, RR, and CC. While I'm not sure what could go wrong by using QQ, I don't think it can be expected to work over QQ either (at the moment).

TheGrateSalmon avatar Feb 27 '24 19:02 TheGrateSalmon