HP Forums
serious inverse matrix bug? - Printable Version

+- HP Forums (https://www.hpmuseum.org/forum)
+-- Forum: HP Calculators (and very old HP Computers) (/forum-3.html)
+--- Forum: HP Prime (/forum-5.html)
+--- Thread: serious inverse matrix bug? (/thread-14103.html)



serious inverse matrix bug? - deachp - 12-05-2019 04:49 AM

Hello, I found this bug calculating the inverse of a matrix in the latest firmware, Have you guys seen it in any previous firmware before?

[Image: error_inversa%20prime_01.jpg]
[Image: error_inversa%20prime_00.jpg]

[Image: error_inversa%20prime_02.jpg]
[Image: error_inversa%20prime_03.jpg]


RE: serious inverse matrix bug? - Tim Wessman - 12-05-2019 01:16 PM

I forwarded on to the CAS author and it has been corrected. Only looked like it happened due to the approximate number in there.

1/2*s would have worked fine.


RE: serious inverse matrix bug? - Albert Chan - 12-05-2019 01:38 PM

Tried doing inverse by "hand", XCas 1.4.9-57 (win32).
The bug maybe in rref()

Code:
XCas> m := [[1,0,1,0], [0,1/(2*s),0,1]]
XCas> rref(m)          → [[1,0,  1,0]    , [0,1,  0,2*s]]
XCas> rref(float(m))   → [[1,0,  2.0*s,0], [0,1,  0,4.0*s^2]] ???

BTW, doing inv([[1,0], [0,1/(2.*s)]]) crash XCas.


RE: serious inverse matrix bug? - parisse - 12-05-2019 07:10 PM

(12-05-2019 01:38 PM)Albert Chan Wrote:  The bug maybe in rref()

Yes, it was a bug in rref. I fixed it by converting approx coefficients to exact (with a warning).