Mdeterm solving matrix determinant

Hi, I’ve stumbled accros with a strange issue, using LO Calc in spreadsheet calculating matrices, especially a determinant of the matrix with mdeterm() function. The function gives wrong answer. So here is the data in the calc file: https://drive.google.com/open?id=1S4ptB2AqvPya9fIjYOQhclOUZmeoUG76

Octave gives answer for this matrix Det(A)=23503.602875
(matrix for solving in octave: A=[10, 22.5, 71.25; 22.5, 71.25, 253.13; 71.25, 235.13, 958.31]) error in third row a32 index

I’ve checked with wolframalpha and gives the same answer as Octave.

I found similar issue with this function in the buggzila . But it is shown, that this bug is fixed.

So, why do LO Calc gives me wrong answer? Any suggestions?

P.S. LO version: 5.4.6.2 (x64)

I find no error in the calculation in Calc. Do you have considered, that the displayed values are rounded? If you compare it with other calculators you have to use

  10       22.5      71.25
  22.5     71.25    253.125
  71.25   253.125   958.3125    

det(A)=6806.25

If you do not believe it, calculate it with Sarrus-rule with a pocket calculator

With the example document given and Sarrus rule in Calc:

=A4*B5*C6+B4*C5*A6+A5*B6*C4-C4*B5*A6-B4*A5*C6-C5*B6*A4

=> 6806.25

It’s “funny” but sad that both Octave and Wolfram apparently give the same wrong answer… yet other calculators on the net agree with Calc.

Hi, Regina,

thanks for the answer. That definitely has an influence on result, but not to much. The difference is by few tenth’s. So, yeah, roundof is, because I didn’t check what real value was in a cell e.g. 958.3125 Calc shows in general format as 958.31.

But real issue was human failure! When typing matrix, I’ve accidentally messed up one number in third row i.e. it should be 253.13, and my typo was 235.15. So Octave gave me another result.

Again, everything works great, all programs shows the same answer! Sorry for false interpretation.

P.S. I’ve checked the determinant with Sarrus rule, and the result was again - correct. Thank you!

@OSS-user - You have “closed” this Q&A, but you haven’t “accepted” the “right” answer – you do that by clicking the symbol at the top-left of the correct answer. Please do this! That’s a signal in the Askbot systm to other users that the question has been solved. Thanks.