Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LU decomposition over RealDoubleField for non-square matrix is not LU #25820

Open
unhyperbolic opened this issue Jul 11, 2018 · 0 comments
Open

Comments

@unhyperbolic
Copy link

When doing LU decomposition over RealDoubleField with a non-square matrix, the L matrix has entries above the diagonal and non-1 on the diagonal and the U matrix has entries below it. Some entries are clearly too large...

sage: m=matrix([[0,0,0],[0,0,0],[1,0,0],[0,1,0],[0,0,1]])
sage: (m.change_ring(RDF) + RDF(0.000001) * matrix.random(RDF,5,3)).LU()
(
[0.0 0.0 1.0 0.0 0.0]  [                    1.0                     0.0                     0.0 -1.8760367664879336e-07                     1.0]  [      1.0000005169231803    5.204559874895986e-09   -4.501977663112735e-07]
[0.0 0.0 0.0 1.0 0.0]  [-1.8760367664879336e-07                     1.0                     0.0  -2.583294299022137e-07   5.728415115080068e-07]  [                     0.0       1.0000000471144364    9.669789257946877e-07]
[0.0 0.0 0.0 0.0 1.0]  [ -2.583294299022137e-07   5.728415115080068e-07                     1.0   4.766095912370668e-07 -3.5971730044271383e-07]  [                     0.0                      0.0       0.9999999362631513]
[0.0 1.0 0.0 0.0 0.0]  [  4.766095912370668e-07 -3.5971730044271383e-07  1.0203360856729682e-07  -2.910426049071506e-07  1.8384295593485092e-07]  [                     0.0        4.7439512333e-314        4.7705952805e-314]
[1.0 0.0 0.0 0.0 0.0], [ -2.910426049071506e-07  1.8384295593485092e-07  1.0357502158488482e-07       4.7362984647e-314                     0.0], [       8.7001827431e-313 -1.2907432083930526e-231  -3.105036184601418e+231]
)

Component: numerical

Issue created by migration from https://trac.sagemath.org/ticket/25820

@unhyperbolic unhyperbolic added this to the sage-8.3 milestone Jul 11, 2018
@mkoeppe mkoeppe removed this from the sage-8.3 milestone Dec 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants