Index: /trunk/psLib/src/dataManip/psFunctions.c
===================================================================
--- /trunk/psLib/src/dataManip/psFunctions.c	(revision 1984)
+++ /trunk/psLib/src/dataManip/psFunctions.c	(revision 1985)
@@ -7,6 +7,6 @@
  *  polynomials.  It also contains a Gaussian functions.
  *
- *  @version $Revision: 1.50 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2004-10-06 21:30:53 $
+ *  @version $Revision: 1.51 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2004-10-06 22:27:06 $
  *
  *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
@@ -2065,4 +2065,7 @@
  
 XXX: SDR is silent about data types.  PS_TYPE_F32 is implemented.
+ 
+XXX: The spline eval functions require input and output to be F32.  however
+     the spline fit functions require F32 and F64.
  *****************************************************************************/
 float psSpline1DEval(const psSpline1D *spline,
@@ -2090,4 +2093,6 @@
 }
 
+// XXX: The spline eval functions require input and output to be F32.
+// however the spline fit functions require F32 and F64.
 psVector *psSpline1DEvalVector(const psVector *x,
                                const psSpline1D *spline)
@@ -2097,6 +2102,15 @@
 
     tmpVector = psVectorAlloc(x->n, PS_TYPE_F32);
-    for (i=0;i<x->n;i++) {
-        tmpVector->data.F32[i] = psSpline1DEval(spline, x->data.F32[i]);
+    if (x->type.type == PS_TYPE_F32) {
+        for (i=0;i<x->n;i++) {
+            tmpVector->data.F32[i] = psSpline1DEval(spline, x->data.F32[i]);
+        }
+    } else if (x->type.type == PS_TYPE_F64) {
+        for (i=0;i<x->n;i++) {
+            tmpVector->data.F32[i] = psSpline1DEval(spline, (float) x->data.F64[i]);
+        }
+    } else {
+        psError(__func__, "Unknown data type.\n");
+        return(NULL);
     }
 
Index: /trunk/psLib/src/math/psPolynomial.c
===================================================================
--- /trunk/psLib/src/math/psPolynomial.c	(revision 1984)
+++ /trunk/psLib/src/math/psPolynomial.c	(revision 1985)
@@ -7,6 +7,6 @@
  *  polynomials.  It also contains a Gaussian functions.
  *
- *  @version $Revision: 1.50 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2004-10-06 21:30:53 $
+ *  @version $Revision: 1.51 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2004-10-06 22:27:06 $
  *
  *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
@@ -2065,4 +2065,7 @@
  
 XXX: SDR is silent about data types.  PS_TYPE_F32 is implemented.
+ 
+XXX: The spline eval functions require input and output to be F32.  however
+     the spline fit functions require F32 and F64.
  *****************************************************************************/
 float psSpline1DEval(const psSpline1D *spline,
@@ -2090,4 +2093,6 @@
 }
 
+// XXX: The spline eval functions require input and output to be F32.
+// however the spline fit functions require F32 and F64.
 psVector *psSpline1DEvalVector(const psVector *x,
                                const psSpline1D *spline)
@@ -2097,6 +2102,15 @@
 
     tmpVector = psVectorAlloc(x->n, PS_TYPE_F32);
-    for (i=0;i<x->n;i++) {
-        tmpVector->data.F32[i] = psSpline1DEval(spline, x->data.F32[i]);
+    if (x->type.type == PS_TYPE_F32) {
+        for (i=0;i<x->n;i++) {
+            tmpVector->data.F32[i] = psSpline1DEval(spline, x->data.F32[i]);
+        }
+    } else if (x->type.type == PS_TYPE_F64) {
+        for (i=0;i<x->n;i++) {
+            tmpVector->data.F32[i] = psSpline1DEval(spline, (float) x->data.F64[i]);
+        }
+    } else {
+        psError(__func__, "Unknown data type.\n");
+        return(NULL);
     }
 
Index: /trunk/psLib/src/math/psSpline.c
===================================================================
--- /trunk/psLib/src/math/psSpline.c	(revision 1984)
+++ /trunk/psLib/src/math/psSpline.c	(revision 1985)
@@ -7,6 +7,6 @@
  *  polynomials.  It also contains a Gaussian functions.
  *
- *  @version $Revision: 1.50 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2004-10-06 21:30:53 $
+ *  @version $Revision: 1.51 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2004-10-06 22:27:06 $
  *
  *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
@@ -2065,4 +2065,7 @@
  
 XXX: SDR is silent about data types.  PS_TYPE_F32 is implemented.
+ 
+XXX: The spline eval functions require input and output to be F32.  however
+     the spline fit functions require F32 and F64.
  *****************************************************************************/
 float psSpline1DEval(const psSpline1D *spline,
@@ -2090,4 +2093,6 @@
 }
 
+// XXX: The spline eval functions require input and output to be F32.
+// however the spline fit functions require F32 and F64.
 psVector *psSpline1DEvalVector(const psVector *x,
                                const psSpline1D *spline)
@@ -2097,6 +2102,15 @@
 
     tmpVector = psVectorAlloc(x->n, PS_TYPE_F32);
-    for (i=0;i<x->n;i++) {
-        tmpVector->data.F32[i] = psSpline1DEval(spline, x->data.F32[i]);
+    if (x->type.type == PS_TYPE_F32) {
+        for (i=0;i<x->n;i++) {
+            tmpVector->data.F32[i] = psSpline1DEval(spline, x->data.F32[i]);
+        }
+    } else if (x->type.type == PS_TYPE_F64) {
+        for (i=0;i<x->n;i++) {
+            tmpVector->data.F32[i] = psSpline1DEval(spline, (float) x->data.F64[i]);
+        }
+    } else {
+        psError(__func__, "Unknown data type.\n");
+        return(NULL);
     }
 
Index: /trunk/psLib/test/dataManip/tst_psFunc00.c
===================================================================
--- /trunk/psLib/test/dataManip/tst_psFunc00.c	(revision 1984)
+++ /trunk/psLib/test/dataManip/tst_psFunc00.c	(revision 1985)
@@ -3,4 +3,10 @@
     allocated and deallocated by the psPolynomialXXXlloc() procedures.
     It also calls the various psPolynomialXXXEval() procedures.
+ 
+    The F32 and F64 polynomials are tested for all orders (1 - 4) and for
+    both ordinary and chebyshev polynomials.
+ 
+    NOTE: This test code requries the stdout file to verify that the results
+    are good.
  *****************************************************************************/
 #include <stdio.h>
@@ -12,5 +18,4 @@
 #define MISC_X_VALUE 5.0
 #define MISC_INT_NUMBER 35
-#define NUM_BINS 200
 #define AN 2
 #define BN 4
@@ -60,5 +65,5 @@
     }
     printFooter(stdout,
-                "psStats functions",
+                "psFunctions functions",
                 "Allocate/Deallocate the psPolynomial1D structure.",
                 testStatus);
@@ -90,5 +95,5 @@
     }
     printFooter(stdout,
-                "psStats functions",
+                "psFunctions functions",
                 "Allocate/Deallocate the psPolynomial2D structure.",
                 testStatus);
@@ -121,5 +126,5 @@
     }
     printFooter(stdout,
-                "psStats functions",
+                "psFunctions functions",
                 "Allocate/Deallocate the psPolynomial3D structure.",
                 testStatus);
@@ -155,5 +160,5 @@
     }
     printFooter(stdout,
-                "psStats functions",
+                "psFunctions functions",
                 "Allocate/Deallocate the psPolynomial4D structure.",
                 testStatus);
@@ -185,5 +190,5 @@
     }
     printFooter(stdout,
-                "psStats functions",
+                "psFunctions functions",
                 "Allocate/Deallocate the psDPolynomial1D structure.",
                 testStatus);
@@ -211,5 +216,5 @@
     }
     printFooter(stdout,
-                "psStats functions",
+                "psFunctions functions",
                 "Allocate/Deallocate the psDPolynomial2D structure.",
                 testStatus);
@@ -242,5 +247,5 @@
     }
     printFooter(stdout,
-                "psStats functions",
+                "psFunctions functions",
                 "Allocate/Deallocate the psDPolynomial3D structure.",
                 testStatus);
@@ -276,5 +281,5 @@
     }
     printFooter(stdout,
-                "psStats functions",
+                "psFunctions functions",
                 "Allocate/Deallocate the psDPolynomial4D structure.",
                 testStatus);
@@ -306,5 +311,5 @@
     }
     printFooter(stdout,
-                "psStats functions",
+                "psFunctions functions",
                 "Allocate/Deallocate the psPolynomial1D structure (CHEBYSHEV).",
                 testStatus);
@@ -335,5 +340,5 @@
     }
     printFooter(stdout,
-                "psStats functions",
+                "psFunctions functions",
                 "Allocate/Deallocate the psPolynomial2D structure (CHEBYSHEV).",
                 testStatus);
@@ -366,5 +371,5 @@
     }
     printFooter(stdout,
-                "psStats functions",
+                "psFunctions functions",
                 "Allocate/Deallocate the psPolynomial3D structure (CHEBYSHEV).",
                 testStatus);
@@ -400,5 +405,5 @@
     }
     printFooter(stdout,
-                "psStats functions",
+                "psFunctions functions",
                 "Allocate/Deallocate the psPolynomial4D structure (CHEBYSHEV).",
                 testStatus);
@@ -430,5 +435,5 @@
     }
     printFooter(stdout,
-                "psStats functions",
+                "psFunctions functions",
                 "Allocate/Deallocate the psDPolynomial1D structure (CHEBYSHEV).",
                 testStatus);
@@ -456,5 +461,5 @@
     }
     printFooter(stdout,
-                "psStats functions",
+                "psFunctions functions",
                 "Allocate/Deallocate the psDPolynomial2D structure (CHEBYSHEV).",
                 testStatus);
@@ -487,5 +492,5 @@
     }
     printFooter(stdout,
-                "psStats functions",
+                "psFunctions functions",
                 "Allocate/Deallocate the psDPolynomial3D structure (CHEBYSHEV).",
                 testStatus);
@@ -521,5 +526,5 @@
     }
     printFooter(stdout,
-                "psStats functions",
+                "psFunctions functions",
                 "Allocate/Deallocate the psDPolynomial4D structure (CHEBYSHEV).",
                 testStatus);
Index: /trunk/psLib/test/dataManip/tst_psFunc07.c
===================================================================
--- /trunk/psLib/test/dataManip/tst_psFunc07.c	(revision 1984)
+++ /trunk/psLib/test/dataManip/tst_psFunc07.c	(revision 1985)
@@ -4,4 +4,9 @@
 values, sets the spline polynomials with psVectorFitSpline1D(), then calls
 psSpline1DEval() on new data values and ensures that the results are correct.
+ 
+F32 and F64 versions are used here.
+ 
+XXX: The spline eval functions are F32 only, while the spline fit functions
+are F32 and F64.
  *****************************************************************************/
 #include <stdio.h>
@@ -62,5 +67,5 @@
     printPositiveTestHeader(stdout,
                             "psFunction functions",
-                            "psSpline1DAlloc()");
+                            "psSpline1DAlloc(), psVectorFitSpline1D, psSpline1DEvalVector: F32 versions");
 
     psVectorFitSpline1D(tmpSpline, x, y, NULL);
@@ -71,4 +76,5 @@
             printf("ERROR[%d]: f(%f) is %f.  Should be %f\n", i,
                    newX->data.F32[i], newY->data.F32[i], myFunc(newX->data.F32[i]));
+            testStatus = false;
         }
     }
@@ -88,5 +94,5 @@
     printFooter(stdout,
                 "psFunctions functions",
-                "psSpline1DAlloc()",
+                "psSpline1DAlloc(), psVectorFitSpline1D, psSpline1DEvalVector: F32 versions",
                 testStatus);
 
@@ -94,5 +100,6 @@
 }
 
-int t00()
+// This is the F64 version of the above test code.
+int t01()
 {
     int testStatus = true;
@@ -110,18 +117,18 @@
     /****************************************************************************/
     testStatus = true;
-    x = psVectorAlloc(NUM_SPLINES+1, PS_TYPE_F32);
-    newX = psVectorAlloc(NUM_SPLINES+1, PS_TYPE_F32);
-    y = psVectorAlloc(NUM_SPLINES+1, PS_TYPE_F32);
+    x = psVectorAlloc(NUM_SPLINES+1, PS_TYPE_F64);
+    newX = psVectorAlloc(NUM_SPLINES+1, PS_TYPE_F64);
+    y = psVectorAlloc(NUM_SPLINES+1, PS_TYPE_F64);
     tmpSpline = psSpline1DAlloc(NUM_SPLINES, 3, MIN, MAX);
 
     for (i=0;i<NUM_SPLINES+1;i++) {
-        x->data.F32[i] = tmpSpline->domains[i];
-        y->data.F32[i] = myFunc(x->data.F32[i]);
+        x->data.F64[i] = tmpSpline->domains[i];
+        y->data.F64[i] = myFunc(x->data.F64[i]);
     }
 
     for (i=0;i<NUM_SPLINES;i++) {
-        newX->data.F32[i]= ((x->data.F32[i] + x->data.F32[i+1])/2.0);
+        newX->data.F64[i]= ((x->data.F64[i] + x->data.F64[i+1])/2.0);
     }
-    newX->data.F32[NUM_SPLINES] = x->data.F32[NUM_SPLINES];
+    newX->data.F64[NUM_SPLINES] = x->data.F64[NUM_SPLINES];
     /****************************************************************************/
     /*   psLib Code      */
@@ -129,5 +136,5 @@
     printPositiveTestHeader(stdout,
                             "psFunction functions",
-                            "psSpline1DAlloc()");
+                            "psSpline1DAlloc(), psVectorFitSpline1D, psSpline1DEvalVector: F64 versions");
 
     psVectorFitSpline1D(tmpSpline, x, y, NULL);
@@ -135,7 +142,8 @@
 
     for (i=OFFSET;i<NUM_SPLINES-OFFSET+1;i++) {
-        if ( fabs( newY->data.F32[i] - myFunc(newX->data.F32[i]) ) > fabs( ERROR_TOLERANCE * myFunc(newX->data.F32[i]) ) ) {
+        if ( fabs( newY->data.F32[i] - myFunc(newX->data.F64[i]) ) > fabs( ERROR_TOLERANCE * myFunc((float)newX->data.F64[i]) ) ) {
             printf("ERROR[%d]: f(%f) is %f.  Should be %f\n", i,
-                   newX->data.F32[i], newY->data.F32[i], myFunc(newX->data.F32[i]));
+                   newX->data.F64[i], newY->data.F32[i], myFunc((float)newX->data.F64[i]));
+            testStatus = false;
         }
     }
@@ -155,5 +163,5 @@
     printFooter(stdout,
                 "psFunctions functions",
-                "psSpline1DAlloc()",
+                "psSpline1DAlloc(), psVectorFitSpline1D, psSpline1DEvalVector: F64 versions",
                 testStatus);
 
@@ -164,3 +172,4 @@
 {
     t00();
+    t01();
 }
