MathGroup Archive 1992

[Date Index] [Thread Index] [Author Index]

Search the Archive

Determinant function in Mathematica

Here's a speed up of my earlier code;  obtained by exploiting Transpose
better. The moral seems to be to work globally on large list constructions-
Think big I guess.

NewDet2[M_] := 
The timings on my MacIIfx are
a[n_] := Table[ StringJoin["a",ToString[i],ToString[j]], {i,1,n},{j,1,n}]

Do[ Print[ First[ Timing[ NewDet2[ a[t]]]]], {t,1,7}]
0.0666667 Second
0.0833333 Second
0.133333 Second
0.283333 Second
0.933333 Second
5.13333 Second
38.1833 Second
The timings for the previous form (NewDet) were

Do[ Print[ First[ Timing[ NewDet[ a[t]]]]], {t,1,7}]

0.25 Second
0.0833333 Second
0.15 Second
0.3 Second
1.06667 Second
5.91667 Second
43.9333 Second

Allan Hayes
Department of Mathematics
The University
Leicester LE1 7RH
hay at

  • Prev by Date: Calculus.m
  • Next by Date: Determinant Function (Final Version?)
  • Previous by thread: Re: Determinant function in Mathematica
  • Next by thread: beauty contest. the winner is...