Index: trunk/psLib/src/dataManip/psConstants.h
===================================================================
--- trunk/psLib/src/dataManip/psConstants.h	(revision 2223)
+++ trunk/psLib/src/dataManip/psConstants.h	(revision 2224)
@@ -6,6 +6,6 @@
  *  @author GLG, MHPCC
  *
- *  @version $Revision: 1.28 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2004-10-27 23:31:43 $
+ *  @version $Revision: 1.29 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2004-10-28 00:22:53 $
  *
  *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
@@ -32,5 +32,5 @@
 #define PS_INT_CHECK_NON_NEGATIVE(NAME, RVAL) \
 if (NAME < 0) { \
-    psError(__func__,"%s is less than 0.", #NAME); \
+    psError(__func__,"Error: %s is less than 0.", #NAME); \
     return(RVAL); \
 }
@@ -38,22 +38,28 @@
 #define PS_INT_CHECK_POSITIVE(NAME, RVAL) \
 if (NAME < 1) { \
-    psError(__func__,"%s is 0 or less.", #NAME); \
-    return(RVAL); \
-}
-
+    psError(__func__,"Error: %s is 0 or less.", #NAME); \
+    return(RVAL); \
+}
+
+// Produce an error if ((NAME1 > NAME2)
 #define PS_INT_COMPARE(NAME1, NAME2, RVAL) \
-if (NAME1 < NAME2) { \
-    psError(__func__,"%s is less than %s (%d < %D).", #NAME1, #NAME2, NAME1, NAME2); \
-    return(RVAL); \
-}
-
-
+if (NAME1 > NAME2) { \
+    psError(__func__,"Error: (%s > %s) (%d %d).", #NAME1, #NAME2, NAME1, NAME2); \
+    return(RVAL); \
+}
+
+
+// Produce an error if ((NAME1 > NAME2)
 #define PS_FLOAT_COMPARE(NAME1, NAME2, RVAL) \
-if ((NAME1 - NAME2) < -FLT_EPSILON) { \
-    psError(__func__,"%s is less than %s.", #NAME1, #NAME2); \
-    return(RVAL); \
-}
-
-
+if (NAME1 > NAME2) { \
+    psError(__func__,"Error: (%s > %s) (%f %f)", #NAME1, #NAME2, NAME1, NAME2); \
+    return(RVAL); \
+}
+
+#define PS_FLOAT_CHECK_NON_EQUAL(NAME1, NAME2, RVAL) \
+if (fabs(NAME2 - NAME1) < FLT_EPSILON) { \
+    psError(__func__,"Error: %s and %s are equal.", #NAME1, #NAME2); \
+    return(RVAL); \
+}
 
 /*****************************************************************************
Index: trunk/psLib/src/dataManip/psFunctions.c
===================================================================
--- trunk/psLib/src/dataManip/psFunctions.c	(revision 2223)
+++ trunk/psLib/src/dataManip/psFunctions.c	(revision 2224)
@@ -7,6 +7,6 @@
  *  polynomials.  It also contains a Gaussian functions.
  *
- *  @version $Revision: 1.57 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2004-10-27 23:31:43 $
+ *  @version $Revision: 1.58 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2004-10-28 00:22:53 $
  *
  *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
@@ -1670,5 +1670,5 @@
     PS_INT_CHECK_NON_NEGATIVE(numSplines, NULL);
     PS_INT_CHECK_NON_NEGATIVE(order, NULL);
-    PS_FLOAT_COMPARE(max, min, NULL);
+    PS_FLOAT_CHECK_NON_EQUAL(max, min, NULL);
 
     psSpline1D *tmp = NULL;
@@ -2124,5 +2124,5 @@
     PS_PTR_CHECK_NULL(spline, NULL);
     PS_VECTOR_CHECK_NULL(x, NULL);
-    PS_VECTOR_CHECK_TYPE(x, PS_TYPE_F32, NULL);
+    PS_VECTOR_CHECK_TYPE_F32_OR_F64(x, NULL);
 
     psS32 i;
Index: trunk/psLib/src/dataManip/psStats.c
===================================================================
--- trunk/psLib/src/dataManip/psStats.c	(revision 2223)
+++ trunk/psLib/src/dataManip/psStats.c	(revision 2224)
@@ -9,6 +9,6 @@
  *  @author GLG, MHPCC
  *
- *  @version $Revision: 1.76 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2004-10-27 23:31:43 $
+ *  @version $Revision: 1.77 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2004-10-28 00:22:53 $
 n *
  *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
@@ -1487,5 +1487,5 @@
     PS_VECTOR_CHECK_NULL(bounds, NULL);
     PS_VECTOR_CHECK_TYPE(bounds, PS_TYPE_F32, NULL);
-    PS_INT_COMPARE(bounds->n, 2, NULL);
+    PS_INT_COMPARE(2, bounds->n, NULL);
 
     psHistogram* newHist = NULL;        // The new histogram structure
@@ -1694,5 +1694,5 @@
 
     if ((stats->options & PS_STAT_USE_RANGE) && (stats->min >= stats->max)) {
-        PS_FLOAT_COMPARE(stats->max, stats->min, stats);
+        PS_FLOAT_COMPARE(stats->min, stats->max, stats);
     }
 
Index: trunk/psLib/src/math/psConstants.h
===================================================================
--- trunk/psLib/src/math/psConstants.h	(revision 2223)
+++ trunk/psLib/src/math/psConstants.h	(revision 2224)
@@ -6,6 +6,6 @@
  *  @author GLG, MHPCC
  *
- *  @version $Revision: 1.28 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2004-10-27 23:31:43 $
+ *  @version $Revision: 1.29 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2004-10-28 00:22:53 $
  *
  *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
@@ -32,5 +32,5 @@
 #define PS_INT_CHECK_NON_NEGATIVE(NAME, RVAL) \
 if (NAME < 0) { \
-    psError(__func__,"%s is less than 0.", #NAME); \
+    psError(__func__,"Error: %s is less than 0.", #NAME); \
     return(RVAL); \
 }
@@ -38,22 +38,28 @@
 #define PS_INT_CHECK_POSITIVE(NAME, RVAL) \
 if (NAME < 1) { \
-    psError(__func__,"%s is 0 or less.", #NAME); \
-    return(RVAL); \
-}
-
+    psError(__func__,"Error: %s is 0 or less.", #NAME); \
+    return(RVAL); \
+}
+
+// Produce an error if ((NAME1 > NAME2)
 #define PS_INT_COMPARE(NAME1, NAME2, RVAL) \
-if (NAME1 < NAME2) { \
-    psError(__func__,"%s is less than %s (%d < %D).", #NAME1, #NAME2, NAME1, NAME2); \
-    return(RVAL); \
-}
-
-
+if (NAME1 > NAME2) { \
+    psError(__func__,"Error: (%s > %s) (%d %d).", #NAME1, #NAME2, NAME1, NAME2); \
+    return(RVAL); \
+}
+
+
+// Produce an error if ((NAME1 > NAME2)
 #define PS_FLOAT_COMPARE(NAME1, NAME2, RVAL) \
-if ((NAME1 - NAME2) < -FLT_EPSILON) { \
-    psError(__func__,"%s is less than %s.", #NAME1, #NAME2); \
-    return(RVAL); \
-}
-
-
+if (NAME1 > NAME2) { \
+    psError(__func__,"Error: (%s > %s) (%f %f)", #NAME1, #NAME2, NAME1, NAME2); \
+    return(RVAL); \
+}
+
+#define PS_FLOAT_CHECK_NON_EQUAL(NAME1, NAME2, RVAL) \
+if (fabs(NAME2 - NAME1) < FLT_EPSILON) { \
+    psError(__func__,"Error: %s and %s are equal.", #NAME1, #NAME2); \
+    return(RVAL); \
+}
 
 /*****************************************************************************
Index: trunk/psLib/src/math/psPolynomial.c
===================================================================
--- trunk/psLib/src/math/psPolynomial.c	(revision 2223)
+++ trunk/psLib/src/math/psPolynomial.c	(revision 2224)
@@ -7,6 +7,6 @@
  *  polynomials.  It also contains a Gaussian functions.
  *
- *  @version $Revision: 1.57 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2004-10-27 23:31:43 $
+ *  @version $Revision: 1.58 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2004-10-28 00:22:53 $
  *
  *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
@@ -1670,5 +1670,5 @@
     PS_INT_CHECK_NON_NEGATIVE(numSplines, NULL);
     PS_INT_CHECK_NON_NEGATIVE(order, NULL);
-    PS_FLOAT_COMPARE(max, min, NULL);
+    PS_FLOAT_CHECK_NON_EQUAL(max, min, NULL);
 
     psSpline1D *tmp = NULL;
@@ -2124,5 +2124,5 @@
     PS_PTR_CHECK_NULL(spline, NULL);
     PS_VECTOR_CHECK_NULL(x, NULL);
-    PS_VECTOR_CHECK_TYPE(x, PS_TYPE_F32, NULL);
+    PS_VECTOR_CHECK_TYPE_F32_OR_F64(x, NULL);
 
     psS32 i;
Index: trunk/psLib/src/math/psSpline.c
===================================================================
--- trunk/psLib/src/math/psSpline.c	(revision 2223)
+++ trunk/psLib/src/math/psSpline.c	(revision 2224)
@@ -7,6 +7,6 @@
  *  polynomials.  It also contains a Gaussian functions.
  *
- *  @version $Revision: 1.57 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2004-10-27 23:31:43 $
+ *  @version $Revision: 1.58 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2004-10-28 00:22:53 $
  *
  *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
@@ -1670,5 +1670,5 @@
     PS_INT_CHECK_NON_NEGATIVE(numSplines, NULL);
     PS_INT_CHECK_NON_NEGATIVE(order, NULL);
-    PS_FLOAT_COMPARE(max, min, NULL);
+    PS_FLOAT_CHECK_NON_EQUAL(max, min, NULL);
 
     psSpline1D *tmp = NULL;
@@ -2124,5 +2124,5 @@
     PS_PTR_CHECK_NULL(spline, NULL);
     PS_VECTOR_CHECK_NULL(x, NULL);
-    PS_VECTOR_CHECK_TYPE(x, PS_TYPE_F32, NULL);
+    PS_VECTOR_CHECK_TYPE_F32_OR_F64(x, NULL);
 
     psS32 i;
Index: trunk/psLib/src/math/psStats.c
===================================================================
--- trunk/psLib/src/math/psStats.c	(revision 2223)
+++ trunk/psLib/src/math/psStats.c	(revision 2224)
@@ -9,6 +9,6 @@
  *  @author GLG, MHPCC
  *
- *  @version $Revision: 1.76 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2004-10-27 23:31:43 $
+ *  @version $Revision: 1.77 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2004-10-28 00:22:53 $
 n *
  *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
@@ -1487,5 +1487,5 @@
     PS_VECTOR_CHECK_NULL(bounds, NULL);
     PS_VECTOR_CHECK_TYPE(bounds, PS_TYPE_F32, NULL);
-    PS_INT_COMPARE(bounds->n, 2, NULL);
+    PS_INT_COMPARE(2, bounds->n, NULL);
 
     psHistogram* newHist = NULL;        // The new histogram structure
@@ -1694,5 +1694,5 @@
 
     if ((stats->options & PS_STAT_USE_RANGE) && (stats->min >= stats->max)) {
-        PS_FLOAT_COMPARE(stats->max, stats->min, stats);
+        PS_FLOAT_COMPARE(stats->min, stats->max, stats);
     }
 
