NAME:determ2
PURPOSE: computes the determinant of n 2 by 2 arrays
CATEGORY: no DO loops and better accuracy
CALLING SEQUENCE: 2 cases:
res = determ2(z2ds)
res = determ2(z1d00,z1d01,z1d10,z1d11)
INPUTS:
z2ds: an 2*2*n array
or
z1d00,z1d01,z1d10,z1d11: the four n elements arrays
defined as:
z2ds[0, 0, *] = z1d00
z2ds[0, 1, *] = z1d01
z2ds[1, 0, *] = z1d10
z2ds[1, 1, *] = z1d11
OUTPUTS: n elements array, the determinent of each 2*2 arrrays
EXAMPLE:
a=findgen(2,2,5)
print, determ2(a)
FOR i=0,4 DO print, determ(a[*,*,i]) ; IDL solution
MODIFICATION HISTORY: