Index: trunk/psLib/src/math/psMatrix.c
===================================================================
--- trunk/psLib/src/math/psMatrix.c	(revision 17529)
+++ trunk/psLib/src/math/psMatrix.c	(revision 17564)
@@ -22,6 +22,6 @@
  *  @author Andy Becker, University of Washington (SVD).
  *
- *  @version $Revision: 1.56 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2008-04-17 23:43:02 $
+ *  @version $Revision: 1.57 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2008-05-07 23:10:46 $
  *
  *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
@@ -415,5 +415,10 @@
     gsl_linalg_LU_invert(lu, perm, inv);
     if (determinant) {
-        *determinant = (float)gsl_linalg_LU_lndet(lu);
+      // XXX this is getting the wrong value: is it the wrong calculation?
+      // it disagrees with the results of 
+      // det = (psF32)gsl_linalg_LU_det(lu, signum);
+      // used in psMatrixDeterminatn
+      // *determinant = (float)gsl_linalg_LU_lndet(lu);
+      *determinant = (psF32)gsl_linalg_LU_det(lu, signum);
     }
 
@@ -526,9 +531,8 @@
 {
     // Error checks
-    #define TRANSPOSE_CLEANUP { return NULL; }
-    PS_ASSERT_GENERAL_IMAGE_NON_NULL(in, TRANSPOSE_CLEANUP);
-    PS_CHECK_DIMEN_AND_TYPE(in, PS_DIMEN_IMAGE, TRANSPOSE_CLEANUP);
-    PS_ASSERT_GENERAL_IMAGE_NON_EMPTY(in, TRANSPOSE_CLEANUP);
-    PS_CHECK_POINTERS(in, out, TRANSPOSE_CLEANUP);
+    PS_ASSERT_IMAGE_NON_NULL(in, NULL);
+    PS_ASSERT_IMAGE_NON_EMPTY(in, NULL);
+    PS_CHECK_DIMEN_AND_TYPE(in, PS_DIMEN_IMAGE, return NULL);
+    PS_ASSERT(in != out, NULL);
 
     int numCols = in->numRows, numRows = in->numCols; // Size of transposed image
