Index: /trunk/psLib/src/dataManip/psMatrixVectorArithmetic.c
===================================================================
--- /trunk/psLib/src/dataManip/psMatrixVectorArithmetic.c	(revision 1540)
+++ /trunk/psLib/src/dataManip/psMatrixVectorArithmetic.c	(revision 1541)
@@ -30,6 +30,6 @@
  *  @author Ross Harman, MHPCC
  *
- *  @version $Revision: 1.24 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2004-08-13 01:25:23 $
+ *  @version $Revision: 1.25 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2004-08-14 01:31:43 $
  *
  *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
@@ -640,5 +640,5 @@
 } else if(!strncmp(OP, "dsin", 4)) {                                                                         \
     if(PS_IS_PSELEMTYPE_COMPLEX(IN->type)) {                                                                 \
-        UNARY_TYPE(DIM,OUT,IN,csin(*i1*D2R+FLT_EPSILON));                                                    \
+        UNARY_TYPE(DIM,OUT,IN,csin(*i1*D2R));                                                                \
     } else {                                                                                                 \
         UNARY_TYPE(DIM,OUT,IN,sin(*i1*D2R));                                                                 \
@@ -678,5 +678,5 @@
         UNARY_TYPE(DIM,OUT,IN,R2D*casin(*i1));                                                               \
     } else if(PS_IS_PSELEMTYPE_INT(IN->type)) {                                                              \
-        UNARY_TYPE(DIM,OUT,IN,(R2D*asin(*i1)+FLT_EPSILON));                                                  \
+        UNARY_TYPE(DIM,OUT,IN,(R2D*asin(*i1)));                                                              \
     } else {                                                                                                 \
         UNARY_TYPE(DIM,OUT,IN,(R2D*asin(*i1)));                                                              \
@@ -692,5 +692,5 @@
         UNARY_TYPE(DIM,OUT,IN,R2D*cacos(*i1));                                                               \
     } else if(PS_IS_PSELEMTYPE_INT(IN->type)) {                                                              \
-        UNARY_TYPE(DIM,OUT,IN,(R2D*acos(*i1)+FLT_EPSILON));                                                  \
+        UNARY_TYPE(DIM,OUT,IN,(R2D*acos(*i1)));                                                              \
     } else {                                                                                                 \
         UNARY_TYPE(DIM,OUT,IN,R2D*acos(*i1));                                                                \
Index: /trunk/psLib/test/dataManip/tst_psMatrixVectorArithmetic02.c
===================================================================
--- /trunk/psLib/test/dataManip/tst_psMatrixVectorArithmetic02.c	(revision 1540)
+++ /trunk/psLib/test/dataManip/tst_psMatrixVectorArithmetic02.c	(revision 1541)
@@ -10,6 +10,6 @@
  *  @author  Ross Harman, MHPCC
  *
- *  @version $Revision: 1.3 $  $Name: not supported by cvs2svn $
- *  @date  $Date: 2004-08-06 22:34:06 $
+ *  @version $Revision: 1.4 $  $Name: not supported by cvs2svn $
+ *  @date  $Date: 2004-08-14 01:31:30 $
  *
  *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
@@ -23,38 +23,39 @@
 
 
-#define PRINT_SCALAR(SCALAR,TYPE)                                                                            \
-if(PS_IS_PSELEMTYPE_COMPLEX(SCALAR->type.type)) {                                                            \
-    printf("%.2f%f+.2i ", creal(SCALAR->data.TYPE), cimag(SCALAR->data.TYPE));                                   \
-} else if(PS_IS_PSELEMTYPE_INT(SCALAR->type.type)) {                                                         \
-    printf("%d", (int)SCALAR->data.TYPE);                                                                    \
-} else {                                                                                                     \
-    printf("%.2f", (double)SCALAR->data.TYPE);                                                                 \
-}                                                                                                            \
-printf("\n\n");
-
-
-#define PRINT_VECTOR(VECTOR,TYPE)                                                                            \
+#define CHECK_VECTOR(VECTOR,TYPE,TRUTH)                                                                      \
 for(int i=0; i<VECTOR->n; i++) {                                                                             \
-    if(PS_IS_PSELEMTYPE_COMPLEX(VECTOR->type.type)) {                                                        \
-        printf("%.2f%+.2fi\n", creal(VECTOR->data.TYPE[i]), cimag(VECTOR->data.TYPE[i]));                        \
-    } else if(PS_IS_PSELEMTYPE_INT(VECTOR->type.type)) {                                                     \
-        printf("%d\n", (int)VECTOR->data.TYPE[i]);                                                           \
-    } else {                                                                                                 \
-        printf("%.2f\n", (double)VECTOR->data.TYPE[i]);                                                        \
-    }                                                                                                        \
+    if(cabs(VECTOR->data.TYPE[i])-cabs(TRUTH) > FLT_EPSILON){                                                \
+        printf("ERROR:Truth and calculated values don't match for vector operation:\n");                     \
+        if(PS_IS_PSELEMTYPE_COMPLEX(VECTOR->type.type)) {                                                    \
+            printf("Truth: %.2f%+.2fi\n", creal(VECTOR->data.TYPE[i]), cimag(VECTOR->data.TYPE[i]));         \
+            printf("Calculated: %.2f%+.2fi\n", creal(TRUTH), cimag(TRUTH));                                  \
+        } else if(PS_IS_PSELEMTYPE_INT(VECTOR->type.type)) {                                                 \
+            printf("Truth: %d\n", (int)(VECTOR->data.TYPE[i]));                                              \
+            printf("Calculated: %d\n", (int)(TRUTH));                                                        \
+        } else {                                                                                             \
+            printf("Truth: %.2f\n", (double)(VECTOR->data.TYPE[i]));                                         \
+            printf("Calculated: %.2f\n", (double)(TRUTH));                                                   \
+        }                                                                                                    \
+    }                                                                                                       \
 }                                                                                                            \
 printf("\n");
 
 
-#define PRINT_MATRIX(IMAGE,TYPE)                                                                             \
+#define CHECK_MATRIX(IMAGE,TYPE,TRUTH)                                                                       \
 for(int i=IMAGE->numRows-1; i>-1; i--) {                                                                     \
     for(int j=0; j<IMAGE->numCols; j++) {                                                                    \
-        if(PS_IS_PSELEMTYPE_COMPLEX(IMAGE->type.type)) {                                                     \
-            printf("%.2f%+.2fi ", creal(IMAGE->data.TYPE[i][j]), cimag(IMAGE->data.TYPE[i][j]));                 \
-        } else if(PS_IS_PSELEMTYPE_INT(IMAGE->type.type)) {                                                  \
-            printf("%d ", (int)IMAGE->data.TYPE[i][j]);                                                      \
-        } else {                                                                                             \
-            printf("%.2f ", (double)IMAGE->data.TYPE[i][j]);                                                   \
-        }                                                                                                    \
+        if(cabs(IMAGE->data.TYPE[i][j])-cabs(TRUTH) > FLT_EPSILON){                                         \
+            printf("ERROR:Truth and calculated values don't match for matrix operation:\n");                 \
+            if(PS_IS_PSELEMTYPE_COMPLEX(IMAGE->type.type)) {                                                 \
+                printf("Truth: %.2f%+.2fi\n", creal(IMAGE->data.TYPE[i][j]), cimag(IMAGE->data.TYPE[i][j])); \
+                printf("Calculated: %.2f%+.2fi\n", creal(TRUTH), cimag(TRUTH));                              \
+            } else if(PS_IS_PSELEMTYPE_INT(IMAGE->type.type)) {                                              \
+                printf("Truth: %d\n", (int)(IMAGE->data.TYPE[i][j]));                                        \
+                printf("Calculated: %d\n", (int)(TRUTH));                                                    \
+            } else {                                                                                         \
+                printf("Truth: %.2f\n", (double)(IMAGE->data.TYPE[i][j]));                                   \
+                printf("Calculated: %.2f\n", (double)(TRUTH));                                               \
+            }                                                                                                \
+        }                                                                                                   \
     }                                                                                                        \
     printf("\n");                                                                                            \
@@ -92,5 +93,5 @@
 
     // Test matrix unary operations
-    #define testBinaryOpM(OP,TYPE,VALUE1,VALUE2,NROWS,NCOLS)                                                 \
+    #define testUnaryOpM(OP,TYPE,VALUE1,VALUE2,NROWS,NCOLS,TRUTH)                                            \
     {                                                                                                        \
         printPositiveTestHeader(stdout, "psMatrixVectorArithmetic", "Test matrix psUnaryOp");                \
@@ -98,10 +99,6 @@
         CREATE_AND_SET_IMAGE(inImage,TYPE,VALUE1,NROWS,NCOLS);                                               \
         CREATE_AND_SET_IMAGE(outImage,TYPE,VALUE2,NROWS,NCOLS);                                              \
-        printf("Input:\n");                                                                                  \
-        PRINT_MATRIX(inImage,TYPE);                                                                          \
-        PRINT_MATRIX(outImage,TYPE);                                                                         \
         outImage = (psImage*)psUnaryOp(outImage, inImage, #OP);                                              \
-        printf("Output:\n");                                                                                 \
-        PRINT_MATRIX(outImage,TYPE);                                                                         \
+        CHECK_MATRIX(outImage,TYPE,TRUTH);                                                                   \
         psFree(inImage);                                                                                     \
         psFree(outImage);                                                                                    \
@@ -110,76 +107,76 @@
     }
 
-    testBinaryOpM( abs, S32, -10, 0, 3, 2 );
-    testBinaryOpM( abs, F32, -10.0, 0.0, 3, 2 );
-    testBinaryOpM( abs, F64, -10.0, 0.0, 3, 2 );
-    testBinaryOpM( abs, C32, -10.0 - 10.0i, 0.0 + 0.0i, 3, 2 );
-    testBinaryOpM( exp, S32, 10, 0, 3, 2 );
-    testBinaryOpM( exp, F32, 10.0, 0.0, 3, 2 );
-    testBinaryOpM( exp, F64, 10.0, 0.0, 3, 2 );
-    testBinaryOpM( exp, C32, 10.0 + 10.0i, 0.0 + 0.0i, 3, 2 );
-    testBinaryOpM( ln, S32, 10, 0, 3, 2 );
-    testBinaryOpM( ln, F32, 10.0, 0.0, 3, 2 );
-    testBinaryOpM( ln, F64, 10.0, 0.0, 3, 2 );
-    testBinaryOpM( ln, C32, 10.0 + 10.0i, 0.0 + 0.0i, 3, 2 );
-    testBinaryOpM( ten, S32, 3, 0, 3, 2 );
-    testBinaryOpM( ten, F32, 3.0, 0.0, 3, 2 );
-    testBinaryOpM( ten, F64, 3.0, 0.0, 3, 2 );
-    testBinaryOpM( ten, C32, 3.0 + 3.0i, 0.0 + 0.0i, 3, 2 );
-    testBinaryOpM( log, S32, 1000, 0, 3, 2 );
-    testBinaryOpM( log, F32, 1000.0, 0.0, 3, 2 );
-    testBinaryOpM( log, F64, 1000.0, 0.0, 3, 2 );
-    testBinaryOpM( log, C32, 1000.0 + 1000.0i, 0.0 + 0.0i, 3, 2 );
-    testBinaryOpM( sin, S32, M_PI_2, 0, 3, 2 );
-    testBinaryOpM( sin, F32, M_PI_2, 0.0, 3, 2 );
-    testBinaryOpM( sin, F64, M_PI_2, 0.0, 3, 2 );
-    testBinaryOpM( sin, C32, M_PI_2 + 1.57079632679489661923i, 0.0 + 0.0i, 3, 2 );
-    testBinaryOpM( dsin, S32, 90, 0, 3, 2 );
-    testBinaryOpM( dsin, F32, 90.0, 0.0, 3, 2 );
-    testBinaryOpM( dsin, F64, 90.0, 0.0, 3, 2 );
-    testBinaryOpM( dsin, C32, 90.0 + 90.0i, 0.0 + 0.0i, 3, 2 );
-    testBinaryOpM( cos, S32, 0, 0, 3, 2 );
-    testBinaryOpM( cos, F32, 0.0, 0.0, 3, 2 );
-    testBinaryOpM( cos, F64, 0.0, 0.0, 3, 2 );
-    testBinaryOpM( cos, C32, 0.0 + 0.0i, 0.0 + 0.0i, 3, 2 );
-    testBinaryOpM( dcos, S32, 0, 0, 3, 2 );
-    testBinaryOpM( dcos, F32, 0.0, 0.0, 3, 2 );
-    testBinaryOpM( dcos, F64, 0.0, 0.0, 3, 2 );
-    testBinaryOpM( dcos, C32, 0.0 + 0.0i, 0.0 + 0.0i, 3, 2 );
-    testBinaryOpM( tan, S32, M_PI_4, 0, 3, 2 );
-    testBinaryOpM( tan, F32, M_PI_4, 0.0, 3, 2 );
-    testBinaryOpM( tan, F64, M_PI_4, 0.0, 3, 2 );
-    testBinaryOpM( tan, C32, M_PI_4 + 0.78539816339744830962i, 0.0 + 0.0i, 3, 2 );
-    testBinaryOpM( dtan, S32, 45, 0, 3, 2 );
-    testBinaryOpM( dtan, F32, 45.0, 0.0, 3, 2 );
-    testBinaryOpM( dtan, F64, 45.0, 0.0, 3, 2 );
-    testBinaryOpM( dtan, C32, 45.0 + 45.0i, 0.0 + 0.0i, 3, 2 );
-    testBinaryOpM( asin, S32, 1, 0, 3, 2 );
-    testBinaryOpM( asin, F32, 1.0, 0.0, 3, 2 );
-    testBinaryOpM( asin, F64, 1.0, 0.0, 3, 2 );
-    testBinaryOpM( asin, C32, 1.0 + 1.0i, 0.0 + 0.0i, 3, 2 );
-    testBinaryOpM( dasin, S32, 1.0, 0, 3, 2 );
-    testBinaryOpM( dasin, F32, 1.0, 0.0, 3, 2 );
-    testBinaryOpM( dasin, F64, 1.0, 0.0, 3, 2 );
-    testBinaryOpM( dasin, C32, 1.0 + 1.0i, 0.0 + 0.0i, 3, 2 );
-    testBinaryOpM( acos, S32, 0, 0, 3, 2 );
-    testBinaryOpM( acos, F32, 0.0, 0.0, 3, 2 );
-    testBinaryOpM( acos, F64, 0.0, 0.0, 3, 2 );
-    testBinaryOpM( acos, C32, 0.0 + 0.0i, 0.0 + 0.0i, 3, 2 );
-    testBinaryOpM( dacos, S32, 0, 0, 3, 2 );
-    testBinaryOpM( dacos, F32, 0.0, 0.0, 3, 2 );
-    testBinaryOpM( dacos, F64, 0.0, 0.0, 3, 2 );
-    testBinaryOpM( dacos, C32, 0.0 + 0.0i, 0.0 + 0.0i, 3, 2 );
-    testBinaryOpM( atan, S32, 1, 0, 3, 2 );
-    testBinaryOpM( atan, F32, 1.0, 0.0, 3, 2 );
-    testBinaryOpM( atan, F64, 1.0, 0.0, 3, 2 );
-    testBinaryOpM( atan, C32, 1.0 + 1.0i, 0.0 + 0.0i, 3, 2 );
-    testBinaryOpM( datan, S32, 1, 0, 3, 2 );
-    testBinaryOpM( datan, F32, 1.0, 0.0, 3, 2 );
-    testBinaryOpM( datan, F64, 1.0, 0.0, 3, 2 );
-    testBinaryOpM( datan, C32, 1.0 + 1.0i, 0.0 + 0.0i, 3, 2 );
+    testUnaryOpM( abs, S32, -10, 0, 3, 2, 10 );
+    testUnaryOpM( abs, F32, -10.0, 0.0, 3, 2, 10.0 );
+    testUnaryOpM( abs, F64, -10.0, 0.0, 3, 2, 10.0 );
+    testUnaryOpM( abs, C32, -10.0 - 10.0i, 0.0 + 0.0i, 3, 2,10+10i );
+    testUnaryOpM( exp, S32, 10, 0, 3, 2, cexp(10));
+    testUnaryOpM( exp, F32, 10.0, 0.0, 3, 2, cexp(10.0) );
+    testUnaryOpM( exp, F64, 10.0, 0.0, 3, 2, cexp(10.0) );
+    testUnaryOpM( exp, C32, 1.0 + 1.0i, 0.0 + 0.0i, 3, 2, cexp(1.0+1.0i) );
+    testUnaryOpM( ln, S32, 10, 0, 3, 2, clog(10) );
+    testUnaryOpM( ln, F32, 10.0, 0.0, 3, 2, clog(10.0) );
+    testUnaryOpM( ln, F64, 10.0, 0.0, 3, 2, clog(10.0) );
+    testUnaryOpM( ln, C32, 10.0 + 10.0i, 0.0 + 0.0i, 3, 2, clog(10.0+10.0i) );
+    testUnaryOpM( ten, S32, 3, 0, 3, 2, 1000 );
+    testUnaryOpM( ten, F32, 3.0, 0.0, 3, 2, 1000 );
+    testUnaryOpM( ten, F64, 3.0, 0.0, 3, 2, 1000 );
+    testUnaryOpM( ten, C32, 1.0 + 0.0i, 0.0 + 0.0i, 3, 2, 10.0 );
+    testUnaryOpM( log, S32, 1000, 0, 3, 2, 3 );
+    testUnaryOpM( log, F32, 1000.0, 0.0, 3, 2, 3 );
+    testUnaryOpM( log, F64, 1000.0, 0.0, 3, 2, 3 );
+    testUnaryOpM( log, C32, 1000.0 + 0.0i, 0.0 + 0.0i, 3, 2, 3 );
+    testUnaryOpM( sin, S32, M_PI_2, 0, 3, 2, 1 );
+    testUnaryOpM( sin, F32, M_PI_2, 0.0, 3, 2, 1.0 );
+    testUnaryOpM( sin, F64, M_PI_2, 0.0, 3, 2, 1.0 );
+    testUnaryOpM( sin, C32, M_PI_2 + 0.0i, 0.0 + 0.0i, 3, 2, 1.0 );
+    testUnaryOpM( dsin, S32, 90, 0, 3, 2 , 1);
+    testUnaryOpM( dsin, F32, 90.0, 0.0, 3, 2, 1.0 );
+    testUnaryOpM( dsin, F64, 90.0, 0.0, 3, 2, 1.0 );
+    testUnaryOpM( dsin, C32, 90.0 + 00.0i, 0.0 + 0.0i, 3, 2, 1.0 );
+    testUnaryOpM( cos, S32, 0, 0, 3, 2, 1 );
+    testUnaryOpM( cos, F32, 0.0, 0.0, 3, 2, 1.0 );
+    testUnaryOpM( cos, F64, 0.0, 0.0, 3, 2, 1.0 );
+    testUnaryOpM( cos, C32, 0.0 + 0.0i, 0.0 + 0.0i, 3, 2, 1.0 );
+    testUnaryOpM( dcos, S32, 0, 0, 3, 2, 1 );
+    testUnaryOpM( dcos, F32, 0.0, 0.0, 3, 2, 1.0 );
+    testUnaryOpM( dcos, F64, 0.0, 0.0, 3, 2, 1.0 );
+    testUnaryOpM( dcos, C32, 0.0 + 0.0i, 0.0 + 0.0i, 3, 2, 1.0 );
+    testUnaryOpM( tan, S32, M_PI_4, 0, 3, 2, 1);
+    testUnaryOpM( tan, F32, M_PI_4, 0.0, 3, 2, 1.0 );
+    testUnaryOpM( tan, F64, M_PI_4, 0.0, 3, 2, 1.0 );
+    testUnaryOpM( tan, C32, M_PI_4 + 0.0i, 0.0 + 0.0i, 3, 2, 1 );
+    testUnaryOpM( dtan, S32, 45, 0, 3, 2, 1 );
+    testUnaryOpM( dtan, F32, 45.0, 0.0, 3, 2, 1.0 );
+    testUnaryOpM( dtan, F64, 45.0, 0.0, 3, 2, 1.0 );
+    testUnaryOpM( dtan, C32, 45.0 + 45.0i, 0.0 + 0.0i, 3, 2, 1.0 );
+    testUnaryOpM( asin, S32, 1, 0, 3, 2, M_PI_2);
+    testUnaryOpM( asin, F32, 1.0, 0.0, 3, 2, M_PI_2  );
+    testUnaryOpM( asin, F64, 1.0, 0.0, 3, 2, M_PI_2);
+    testUnaryOpM( asin, C32, 1.0 + 1.0i, 0.0 + 0.0i, 3, 2, M_PI_2);
+    testUnaryOpM( dasin, S32, 1.0, 0, 3, 2, 90 );
+    testUnaryOpM( dasin, F32, 1.0, 0.0, 3, 2, 90.0 );
+    testUnaryOpM( dasin, F64, 1.0, 0.0, 3, 2, 90.0 );
+    testUnaryOpM( dasin, C32, 1.0 + 1.0i, 0.0 + 0.0i, 3, 2, 90.0 );
+    testUnaryOpM( acos, S32, 0, 0, 3, 2, M_PI_2);
+    testUnaryOpM( acos, F32, 0.0, 0.0, 3, 2, M_PI_2 );
+    testUnaryOpM( acos, F64, 0.0, 0.0, 3, 2, M_PI_2 );
+    testUnaryOpM( acos, C32, 0.0 + 0.0i, 0.0 + 0.0i, 3, 2, M_PI_2 );
+    testUnaryOpM( dacos, S32, 0, 0, 3, 2, 90 );
+    testUnaryOpM( dacos, F32, 0.0, 0.0, 3, 2, 90.0 );
+    testUnaryOpM( dacos, F64, 0.0, 0.0, 3, 2, 90.0 );
+    testUnaryOpM( dacos, C32, 0.0 + 0.0i, 0.0 + 0.0i, 3, 2, 90.0 );
+    testUnaryOpM( atan, S32, 1, 0, 3, 2, M_PI_4);
+    testUnaryOpM( atan, F32, 1.0, 0.0, 3, 2, M_PI_4 );
+    testUnaryOpM( atan, F64, 1.0, 0.0, 3, 2, M_PI_4);
+    testUnaryOpM( atan, C32, 1.0 + 0.0i, 0.0 + 0.0i, 3, 2, M_PI_4);
+    testUnaryOpM( datan, S32, 1, 0, 3, 2, 45 );
+    testUnaryOpM( datan, F32, 1.0, 0.0, 3, 2, 45.0 );
+    testUnaryOpM( datan, F64, 1.0, 0.0, 3, 2, 45.0 );
+    testUnaryOpM( datan, C32, 1.0 + 0.0i, 0.0 + 0.0i, 3, 2, 45.0 );
 
 
     // Test vector unary operations
-    #define testBinaryOpV(OP,TYPE,VALUE1,VALUE2,SIZE)                                                        \
+    #define testUnaryOpV(OP,TYPE,VALUE1,VALUE2,SIZE,TRUTH)                                                   \
     {                                                                                                        \
         printPositiveTestHeader(stdout, "psMatrixVectorArithmetic", "Test vector psUnaryOp");                \
@@ -187,10 +184,6 @@
         CREATE_AND_SET_VECTOR(inVector,TYPE,VALUE1,SIZE);                                                    \
         CREATE_AND_SET_VECTOR(outVector,TYPE,VALUE2,SIZE);                                                   \
-        printf("Input:\n");                                                                                  \
-        PRINT_VECTOR(inVector,TYPE);                                                                         \
-        PRINT_VECTOR(outVector,TYPE);                                                                        \
         outVector = (psVector*)psUnaryOp(outVector, inVector, #OP);                                          \
-        printf("Output:\n");                                                                                 \
-        PRINT_VECTOR(outVector,TYPE);                                                                        \
+        CHECK_VECTOR(outVector,TYPE,TRUTH);                                                                  \
         psFree(inVector);                                                                                    \
         psFree(outVector);                                                                                   \
@@ -199,72 +192,72 @@
     }
 
-    testBinaryOpV( abs, S32, -10, 0, 3 );
-    testBinaryOpV( abs, F32, -10.0, 0.0, 3 );
-    testBinaryOpV( abs, F64, -10.0, 0.0, 3 );
-    testBinaryOpV( abs, C32, -10.0 - 10.0i, 0.0 + 0.0i, 3 );
-    testBinaryOpV( exp, S32, 10, 0, 3 );
-    testBinaryOpV( exp, F32, 10.0, 0.0, 3 );
-    testBinaryOpV( exp, F64, 10.0, 0.0, 3 );
-    testBinaryOpV( exp, C32, 10.0 + 10.0i, 0.0 + 0.0i, 3 );
-    testBinaryOpV( ln, S32, 10, 0, 3 );
-    testBinaryOpV( ln, F32, 10.0, 0.0, 3 );
-    testBinaryOpV( ln, F64, 10.0, 0.0, 3 );
-    testBinaryOpV( ln, C32, 10.0 + 10.0i, 0.0 + 0.0i, 3 );
-    testBinaryOpV( ten, S32, 3, 0, 3 );
-    testBinaryOpV( ten, F32, 3.0, 0.0, 3 );
-    testBinaryOpV( ten, F64, 3.0, 0.0, 3 );
-    testBinaryOpV( ten, C32, 3.0 + 3.0i, 0.0 + 0.0i, 3 );
-    testBinaryOpV( log, S32, 1000, 0, 3 );
-    testBinaryOpV( log, F32, 1000.0, 0.0, 3 );
-    testBinaryOpV( log, F64, 1000.0, 0.0, 3 );
-    testBinaryOpV( log, C32, 1000.0 + 1000.0i, 0.0 + 0.0i, 3 );
-    testBinaryOpV( sin, S32, M_PI_2, 0, 3 );
-    testBinaryOpV( sin, F32, M_PI_2, 0.0, 3 );
-    testBinaryOpV( sin, F64, M_PI_2, 0.0, 3 );
-    testBinaryOpV( sin, C32, M_PI_2 + 1.57079632679489661923i, 0.0 + 0.0i, 3 );
-    testBinaryOpV( dsin, S32, 90, 0, 3 );
-    testBinaryOpV( dsin, F32, 90.0, 0.0, 3 );
-    testBinaryOpV( dsin, F64, 90.0, 0.0, 3 );
-    testBinaryOpV( dsin, C32, 90.0 + 90.0i, 0.0 + 0.0i, 3 );
-    testBinaryOpV( cos, S32, 0, 0, 3 );
-    testBinaryOpV( cos, F32, 0.0, 0.0, 3 );
-    testBinaryOpV( cos, F64, 0.0, 0.0, 3 );
-    testBinaryOpV( cos, C32, 0.0 + 0.0i, 0.0 + 0.0i, 3 );
-    testBinaryOpV( dcos, S32, 0, 0, 3 );
-    testBinaryOpV( dcos, F32, 0.0, 0.0, 3 );
-    testBinaryOpV( dcos, F64, 0.0, 0.0, 3 );
-    testBinaryOpV( dcos, C32, 0.0 + 0.0i, 0.0 + 0.0i, 3 );
-    testBinaryOpV( tan, S32, M_PI_4, 0, 3 );
-    testBinaryOpV( tan, F32, M_PI_4, 0.0, 3 );
-    testBinaryOpV( tan, F64, M_PI_4, 0.0, 3 );
-    testBinaryOpV( tan, C32, M_PI_4 + 0.78539816339744830962i, 0.0 + 0.0i, 3 );
-    testBinaryOpV( dtan, S32, 45, 0, 3 );
-    testBinaryOpV( dtan, F32, 45.0, 0.0, 3 );
-    testBinaryOpV( dtan, F64, 45.0, 0.0, 3 );
-    testBinaryOpV( dtan, C32, 45.0 + 45.0i, 0.0 + 0.0i, 3 );
-    testBinaryOpV( asin, S32, 1, 0, 3 );
-    testBinaryOpV( asin, F32, 1.0, 0.0, 3 );
-    testBinaryOpV( asin, F64, 1.0, 0.0, 3 );
-    testBinaryOpV( asin, C32, 1.0 + 1.0i, 0.0 + 0.0i, 3 );
-    testBinaryOpV( dasin, S32, 1.0, 0, 3 );
-    testBinaryOpV( dasin, F32, 1.0, 0.0, 3 );
-    testBinaryOpV( dasin, F64, 1.0, 0.0, 3 );
-    testBinaryOpV( dasin, C32, 1.0 + 1.0i, 0.0 + 0.0i, 3 );
-    testBinaryOpV( acos, S32, 0, 0, 3 );
-    testBinaryOpV( acos, F32, 0.0, 0.0, 3 );
-    testBinaryOpV( acos, F64, 0.0, 0.0, 3 );
-    testBinaryOpV( acos, C32, 0.0 + 0.0i, 0.0 + 0.0i, 3 );
-    testBinaryOpV( dacos, S32, 0, 0, 3 );
-    testBinaryOpV( dacos, F32, 0.0, 0.0, 3 );
-    testBinaryOpV( dacos, F64, 0.0, 0.0, 3 );
-    testBinaryOpV( dacos, C32, 0.0 + 0.0i, 0.0 + 0.0i, 3 );
-    testBinaryOpV( atan, S32, 1, 0, 3 );
-    testBinaryOpV( atan, F32, 1.0, 0.0, 3 );
-    testBinaryOpV( atan, F64, 1.0, 0.0, 3 );
-    testBinaryOpV( atan, C32, 1.0 + 1.0i, 0.0 + 0.0i, 3 );
-    testBinaryOpV( datan, S32, 1, 0, 3 );
-    testBinaryOpV( datan, F32, 1.0, 0.0, 3 );
-    testBinaryOpV( datan, F64, 1.0, 0.0, 3 );
-    testBinaryOpV( datan, C32, 1.0 + 1.0i, 0.0 + 0.0i, 3 );
+    testUnaryOpV( abs, S32, -10, 0, 3, 10 );
+    testUnaryOpV( abs, F32, -10.0, 0.0, 3, 10.0 );
+    testUnaryOpV( abs, F64, -10.0, 0.0, 3, 10.0 );
+    testUnaryOpV( abs, C32, -10.0 - 10.0i, 0.0 + 0.0i, 3, 10+10i );
+    testUnaryOpV( exp, S32, 10, 0, 3, cexp(10));
+    testUnaryOpV( exp, F32, 10.0, 0.0, 3, cexp(10.0) );
+    testUnaryOpV( exp, F64, 10.0, 0.0, 3, cexp(10.0) );
+    testUnaryOpV( exp, C32, 1.0 + 1.0i, 0.0 + 0.0i, 3, cexp(1.0+1.0i) );
+    testUnaryOpV( ln, S32, 10, 0, 3, clog(10) );
+    testUnaryOpV( ln, F32, 10.0, 0.0, 3, clog(10.0) );
+    testUnaryOpV( ln, F64, 10.0, 0.0, 3, clog(10.0) );
+    testUnaryOpV( ln, C32, 10.0 + 10.0i, 0.0 + 0.0i, 3, clog(10.0+10.0i) );
+    testUnaryOpV( ten, S32, 3, 0, 3, 1000 );
+    testUnaryOpV( ten, F32, 3.0, 0.0, 3, 1000 );
+    testUnaryOpV( ten, F64, 3.0, 0.0, 3, 1000 );
+    testUnaryOpV( ten, C32, 1.0 + 0.0i, 0.0 + 0.0i, 3, 10.0 );
+    testUnaryOpV( log, S32, 1000, 0, 3,  3 );
+    testUnaryOpV( log, F32, 1000.0, 0.0, 3, 3 );
+    testUnaryOpV( log, F64, 1000.0, 0.0, 3, 3 );
+    testUnaryOpV( log, C32, 1000.0 + 0.0i, 0.0 + 0.0i, 3, 3 );
+    testUnaryOpV( sin, S32, M_PI_2, 0, 3, 1 );
+    testUnaryOpV( sin, F32, M_PI_2, 0.0, 3, 1.0 );
+    testUnaryOpV( sin, F64, M_PI_2, 0.0, 3, 1.0 );
+    testUnaryOpV( sin, C32, M_PI_2 + 0.0i, 0.0 + 0.0i, 3, 1.0 );
+    testUnaryOpV( dsin, S32, 90, 0, 3, 1);
+    testUnaryOpV( dsin, F32, 90.0, 0.0, 3, 1.0 );
+    testUnaryOpV( dsin, F64, 90.0, 0.0, 3, 1.0 );
+    testUnaryOpV( dsin, C32, 90.0 + 00.0i, 0.0 + 0.0i, 3, 1.0 );
+    testUnaryOpV( cos, S32, 0, 0, 3, 1 );
+    testUnaryOpV( cos, F32, 0.0, 0.0, 3, 1.0 );
+    testUnaryOpV( cos, F64, 0.0, 0.0, 3, 1.0 );
+    testUnaryOpV( cos, C32, 0.0 + 0.0i, 0.0 + 0.0i, 3, 1.0 );
+    testUnaryOpV( dcos, S32, 0, 0, 3, 1 );
+    testUnaryOpV( dcos, F32, 0.0, 0.0, 3, 1.0 );
+    testUnaryOpV( dcos, F64, 0.0, 0.0, 3, 1.0 );
+    testUnaryOpV( dcos, C32, 0.0 + 0.0i, 0.0 + 0.0i, 3, 1.0 );
+    testUnaryOpV( tan, S32, M_PI_4, 0, 3, 1);
+    testUnaryOpV( tan, F32, M_PI_4, 0.0, 3, 1.0 );
+    testUnaryOpV( tan, F64, M_PI_4, 0.0, 3, 1.0 );
+    testUnaryOpV( tan, C32, M_PI_4 + 0.0i, 0.0 + 0.0i, 3, 1 );
+    testUnaryOpV( dtan, S32, 45, 0, 3, 1 );
+    testUnaryOpV( dtan, F32, 45.0, 0.0, 3, 1.0 );
+    testUnaryOpV( dtan, F64, 45.0, 0.0, 3, 1.0 );
+    testUnaryOpV( dtan, C32, 45.0 + 45.0i, 0.0 + 0.0i, 3, 1.0 );
+    testUnaryOpV( asin, S32, 1, 0, 3, M_PI_2);
+    testUnaryOpV( asin, F32, 1.0, 0.0, 3, M_PI_2  );
+    testUnaryOpV( asin, F64, 1.0, 0.0, 3, M_PI_2);
+    testUnaryOpV( asin, C32, 1.0 + 1.0i, 0.0 + 0.0i, 3, M_PI_2);
+    testUnaryOpV( dasin, S32, 1.0, 0, 3, 90 );
+    testUnaryOpV( dasin, F32, 1.0, 0.0, 3, 90.0 );
+    testUnaryOpV( dasin, F64, 1.0, 0.0, 3, 90.0 );
+    testUnaryOpV( dasin, C32, 1.0 + 1.0i, 0.0 + 0.0i, 3, 90.0 );
+    testUnaryOpV( acos, S32, 0, 0, 3, M_PI_2);
+    testUnaryOpV( acos, F32, 0.0, 0.0, 3, M_PI_2 );
+    testUnaryOpV( acos, F64, 0.0, 0.0, 3, M_PI_2 );
+    testUnaryOpV( acos, C32, 0.0 + 0.0i, 0.0 + 0.0i, 3, M_PI_2 );
+    testUnaryOpV( dacos, S32, 0, 0, 3, 90 );
+    testUnaryOpV( dacos, F32, 0.0, 0.0, 3, 90.0 );
+    testUnaryOpV( dacos, F64, 0.0, 0.0, 3, 90.0 );
+    testUnaryOpV( dacos, C32, 0.0 + 0.0i, 0.0 + 0.0i, 3, 90.0 );
+    testUnaryOpV( atan, S32, 1, 0, 3, M_PI_4);
+    testUnaryOpV( atan, F32, 1.0, 0.0, 3, M_PI_4 );
+    testUnaryOpV( atan, F64, 1.0, 0.0, 3, M_PI_4);
+    testUnaryOpV( atan, C32, 1.0 + 0.0i, 0.0 + 0.0i, 3, M_PI_4);
+    testUnaryOpV( datan, S32, 1, 0, 3, 45 );
+    testUnaryOpV( datan, F32, 1.0, 0.0, 3, 45.0 );
+    testUnaryOpV( datan, F64, 1.0, 0.0, 3, 45.0 );
+    testUnaryOpV( datan, C32, 1.0 + 0.0i, 0.0 + 0.0i, 3, 45.0 );
 
     return 0;
