I am sure there are clever ways to reduce the ops yet further;
Slightly more clever (30 multiplications) would be not to use recursive
expansion along one column as you do, but expansion along two columns at
once (that's what I do if I have to calculate such things by hand):
double
G(int j, int k, int m, int n) {
return(
( a[j][0] * a[k][1] - a[k][0] * a[j][1] ) *
( a[m][2] * a[n][3] - a[n][2] * a[m][3] )
);
}
in fact the F-function here suggests such (e.g., the product
a[2][2]*a[3][3]
happens more than once, overall). Plus, the excellent suggestion appearing
before on this scitech list---namely to invoke pivoting even at 4x4---
also might apply to the optimization of the F-function.
--
Martin
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Scitech mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/scitech/email@hidden