41CL Quiz: Determinant of 30x30 anti-Identity matrix
|
05-21-2018, 09:37 AM
Post: #28
|
|||
|
|||
RE: 41CL Quiz: Determinant of 30x30 anti-Identity matrix
To illustrate what the 48G (and successors) do to calculate the determinant, take
the Hilbert matrix of order 5, multiplied by 2520 to make all elements integers. [[ 2520 1260 840 630 504 ] [ 1260 840 630 504 420 ] [ 840 630 504 420 360 ] [ 630 504 420 360 315 ] [ 504 420 360 315 280 ]] The adjustment of the determinant is controlled by flag -54, Tiny element. When that flag is clear, the determinant is adjusted, when set it is not. So, with the above matrix on the stack, DET will show 381024.000008 -54 Set 381024 -54 Clear Now divide the matrix by 10, introducing a few fractional numbers. The result is 3.81024000008 -54 Set 3.81024 -54 Clear Divide it by 10^10 again (so the original matrix is divided by 10^11) 3.81024000008e-50 -54 Set 3.81024e-50 -54 Clear It is clear that the algorithm does not just check for integers. What it does is it determines the scaling factor to guarantee that the least significant digit of the computed determinant, divided by this scaling factor, has a nonnegative exponent, and therefore the ratio can be rounded to integer to possibly achieve greater accuracy. (These are not my words, but Paul McClellan's ;-) This scaling factor is 10^(N*s), where s is the exponent of the least significant digit of all elements of the NxN matrix. Some provisions are being made: - flag -54 set, then the scaling factor is set to 0, meaning no rounding is to be performed - When all elements of the matrix are zero, the scaling factor is set to 1 - for n>79, the scaling factor is set to zero as even in extended precision we risk overflow Cheers, Werner 41CV†,42S,48GX,49G,DM42,DM41X,17BII,15CE,DM15L,12C,16CE |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 14 Guest(s)