Post Reply 
Calculation of determinant on HP-15C
03-13-2021, 05:40 PM
Post: #19
RE: Calculation of determinant on HP-15C
(03-12-2021 07:05 PM)Valentin Albillo Wrote:  This was discussed at length in several threads in the old MoHPC forum decades ago, and I remember that someone actually produced a (small) matrix where using that "cheating" flag resulted in the integer determinant being computed with an error of one full unit, so the cheating didn't pay that time as you got a much worse (a full unit) incorrect result by using it than without.
Actually, I was the one who gave that example, and a few others.
They all started from your own 7x7 matrix AM1, constructed to have a large condition number and a DET=1:

58 71 67 36 35 19 60
50 71 71 56 45 20 52
64 40 84 50 51 43 69
31 28 41 54 31 18 33
45 23 46 38 50 43 50
41 10 28 17 33 41 46
66 72 71 38 40 27 69

On a 48G and up, DET will produce (in approx mode for 49G and up):
F -54 C (default): 1.0
F -54 S : 0.999945522778

Now, if you take AM1*4, the true determinant will be 4^7 = 16384. Now the results of DET are:
F -54 C : 16383.0
F -54 S : 16382.5548739

so the cheat failed here, you could say. But, with a condition number of 6.6e10, both results are equally wrong or right. The exact integer however, may give the feeling that the answer is correct. The reason why my flag -54 is always set, to bypass the fiddling ;-)

Quote:The general conclusion was that tweaking the results to make them conform to (integer) expectations (and to try and mimic greater accuracy that actually wasn't there) was a shoddy work which might embarrassingly backfire. Examples where this was done for other non-HP calculators were also discussed as well.

I wouldn't call it shoddy work - it is quite well done, and will deliver correct results in all but very badly conditioned matrices, where the result can't be trusted anyway. But the same goes for simply solving a set of linear equations: if you don't estimate the condition of your matrix, you don't know to what extent you can trust your results.

Cheers, Werner

41CV†,42S,48GX,49G,DM42,DM41X,17BII,15CE,DM15L,12C,16CE
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: Calculation of determinant on HP-15C - Werner - 03-13-2021 05:40 PM



User(s) browsing this thread: 1 Guest(s)