Talk:LU decomposition: Difference between revisions

m
 
(One intermediate revision by the same user not shown)
Line 55:
::Addition: the VBA code, while not incorrect per se with this modification, is still awfully inefficient (one matrix multiply for each pivot!). All the code needs to be changed. [[User:Eoraptor|Eoraptor]] ([[User talk:Eoraptor|talk]]) 13:51, 15 August 2020 (UTC)
 
== Problems in solutionsolutions ==
 
After correcting the VBA code, I noticed the Ada, C++ and Lisp codes have the same problem, and probably others as well: when selecting the maximum pivot, it's necessary to get the absolute value, otherwise the zero pivot will be selected if it's the only nonnegative element in the possible choices. This is a **bug**.
Line 61:
There are other problems: the Fortran code did the permutation in a blatantly inefficient way (permute all the lower rows at each step), and the author didn't notice that if you permute the whole rows, you don't have to permute anything afterwards to get the L and U components in A: they are just the lower and upper part of A. It's a matrix trick that's easy to prove.
 
Overall, I fear several implementationimplementations here are badly written. Sadly, it's not the first time I notice this on RC: numerical analysis tasktasks are not correctly handled. [[User:Eoraptor|Eoraptor]] ([[User talk:Eoraptor|talk]]) 14:21, 15 August 2020 (UTC)
1,336

edits