Index: /trunk/psLib/src/dataManip/psFunctions.c
===================================================================
--- /trunk/psLib/src/dataManip/psFunctions.c	(revision 4404)
+++ /trunk/psLib/src/dataManip/psFunctions.c	(revision 4405)
@@ -7,6 +7,6 @@
  *  polynomials.  It also contains a Gaussian functions.
  *
- *  @version $Revision: 1.111 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2005-06-25 02:02:05 $
+ *  @version $Revision: 1.112 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2005-06-28 00:53:53 $
  *
  *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
@@ -1232,24 +1232,24 @@
 }
 
-psF32 psPolynomial1DEval(const psPolynomial1D* myPoly, psF32 x)
-{
-    PS_ASSERT_POLY_NON_NULL(myPoly, NAN);
-
-    if (myPoly->type == PS_POLYNOMIAL_ORD) {
-        return(ordPolynomial1DEval(x, myPoly));
-    } else if (myPoly->type == PS_POLYNOMIAL_CHEB) {
-        return(chebPolynomial1DEval(x, myPoly));
+psF64 psPolynomial1DEval(const psPolynomial1D* poly, psF64 x)
+{
+    PS_ASSERT_POLY_NON_NULL(poly, NAN);
+
+    if (poly->type == PS_POLYNOMIAL_ORD) {
+        return(ordPolynomial1DEval(x, poly));
+    } else if (poly->type == PS_POLYNOMIAL_CHEB) {
+        return(chebPolynomial1DEval(x, poly));
     } else {
         psError(PS_ERR_BAD_PARAMETER_TYPE, true,
                 PS_ERRORTEXT_psFunctions_INVALID_POLYNOMIAL_TYPE,
-                myPoly->type);
+                poly->type);
     }
     return(NAN);
 }
 
-psVector *psPolynomial1DEvalVector(const psPolynomial1D *myPoly,
+psVector *psPolynomial1DEvalVector(const psPolynomial1D *poly,
                                    const psVector *x)
 {
-    PS_ASSERT_POLY_NON_NULL(myPoly, NULL);
+    PS_ASSERT_POLY_NON_NULL(poly, NULL);
     PS_ASSERT_VECTOR_NON_NULL(x, NULL);
     PS_ASSERT_VECTOR_TYPE(x, PS_TYPE_F32, NULL);
@@ -1259,5 +1259,5 @@
     tmp = psVectorAlloc(x->n, PS_TYPE_F32);
     for (psS32 i=0;i<x->n;i++) {
-        tmp->data.F32[i] = psPolynomial1DEval(myPoly, x->data.F32[i]);
+        tmp->data.F32[i] = psPolynomial1DEval(poly, x->data.F32[i]);
     }
 
@@ -1265,26 +1265,26 @@
 }
 
-psF32 psPolynomial2DEval(const psPolynomial2D* myPoly, psF32 x, psF32 y)
-{
-    PS_ASSERT_POLY_NON_NULL(myPoly, NAN);
-
-    if (myPoly->type == PS_POLYNOMIAL_ORD) {
-        return(ordPolynomial2DEval(x, y, myPoly));
-    } else if (myPoly->type == PS_POLYNOMIAL_CHEB) {
-        return(chebPolynomial2DEval(x, y, myPoly));
+psF64 psPolynomial2DEval(const psPolynomial2D* poly, psF64 x, psF64 y)
+{
+    PS_ASSERT_POLY_NON_NULL(poly, NAN);
+
+    if (poly->type == PS_POLYNOMIAL_ORD) {
+        return(ordPolynomial2DEval(x, y, poly));
+    } else if (poly->type == PS_POLYNOMIAL_CHEB) {
+        return(chebPolynomial2DEval(x, y, poly));
     } else {
         psError(PS_ERR_BAD_PARAMETER_TYPE, true,
                 PS_ERRORTEXT_psFunctions_INVALID_POLYNOMIAL_TYPE,
-                myPoly->type);
+                poly->type);
     }
     return(NAN);
 }
 
-psVector *psPolynomial2DEvalVector(const psPolynomial2D *myPoly,
+psVector *psPolynomial2DEvalVector(const psPolynomial2D *poly,
                                    const psVector *x,
                                    const psVector *y)
 
 {
-    PS_ASSERT_POLY_NON_NULL(myPoly, NULL);
+    PS_ASSERT_POLY_NON_NULL(poly, NULL);
     PS_ASSERT_VECTOR_NON_NULL(x, NULL);
     PS_ASSERT_VECTOR_TYPE(x, PS_TYPE_F32, NULL);
@@ -1305,5 +1305,5 @@
     // Evaluate the polynomial at the specified points
     for (psS32 i=0; i<vecLen; i++) {
-        tmp->data.F32[i] = psPolynomial2DEval(myPoly,x->data.F32[i],y->data.F32[i]);
+        tmp->data.F32[i] = psPolynomial2DEval(poly,x->data.F32[i],y->data.F32[i]);
     }
 
@@ -1312,21 +1312,21 @@
 }
 
-psF32 psPolynomial3DEval(const psPolynomial3D* myPoly, psF32 x, psF32 y, psF32 z)
-{
-    PS_ASSERT_POLY_NON_NULL(myPoly, NAN);
-
-    if (myPoly->type == PS_POLYNOMIAL_ORD) {
-        return(ordPolynomial3DEval(x, y, z, myPoly));
-    } else if (myPoly->type == PS_POLYNOMIAL_CHEB) {
-        return(chebPolynomial3DEval(x, y, z, myPoly));
+psF64 psPolynomial3DEval(const psPolynomial3D* poly, psF64 x, psF64 y, psF64 z)
+{
+    PS_ASSERT_POLY_NON_NULL(poly, NAN);
+
+    if (poly->type == PS_POLYNOMIAL_ORD) {
+        return(ordPolynomial3DEval(x, y, z, poly));
+    } else if (poly->type == PS_POLYNOMIAL_CHEB) {
+        return(chebPolynomial3DEval(x, y, z, poly));
     } else {
         psError(PS_ERR_BAD_PARAMETER_TYPE, true,
                 PS_ERRORTEXT_psFunctions_INVALID_POLYNOMIAL_TYPE,
-                myPoly->type);
+                poly->type);
     }
     return(NAN);
 }
 
-psVector *psPolynomial3DEvalVector(const psPolynomial3D *myPoly,
+psVector *psPolynomial3DEvalVector(const psPolynomial3D *poly,
                                    const psVector *x,
                                    const psVector *y,
@@ -1334,5 +1334,5 @@
 
 {
-    PS_ASSERT_POLY_NON_NULL(myPoly, NULL);
+    PS_ASSERT_POLY_NON_NULL(poly, NULL);
     PS_ASSERT_VECTOR_NON_NULL(x, NULL);
     PS_ASSERT_VECTOR_TYPE(x, PS_TYPE_F32, NULL);
@@ -1358,5 +1358,5 @@
     // Evaluate polynomial
     for (psS32 i = 0; i < vecLen; i++) {
-        tmp->data.F32[i] = psPolynomial3DEval(myPoly,
+        tmp->data.F32[i] = psPolynomial3DEval(poly,
                                               x->data.F32[i],
                                               y->data.F32[i],
@@ -1368,29 +1368,27 @@
 }
 
-psF32 psPolynomial4DEval(const psPolynomial4D* myPoly, psF32 w, psF32 x, psF32 y, psF32 z)
-{
-    PS_ASSERT_POLY_NON_NULL(myPoly, NAN);
-
-    if (myPoly->type == PS_POLYNOMIAL_ORD) {
-        return(ordPolynomial4DEval(w,x,y,z, myPoly));
-    } else if (myPoly->type == PS_POLYNOMIAL_CHEB) {
-        return(chebPolynomial4DEval(w,x,y,z, myPoly));
+psF64 psPolynomial4DEval(const psPolynomial4D* poly, psF64 x, psF64 y, psF64 z, psF64 t)
+{
+    PS_ASSERT_POLY_NON_NULL(poly, NAN);
+
+    if (poly->type == PS_POLYNOMIAL_ORD) {
+        return(ordPolynomial4DEval(x,y,z,t, poly));
+    } else if (poly->type == PS_POLYNOMIAL_CHEB) {
+        return(chebPolynomial4DEval(x,y,z,t, poly));
     } else {
         psError(PS_ERR_BAD_PARAMETER_TYPE, true,
                 PS_ERRORTEXT_psFunctions_INVALID_POLYNOMIAL_TYPE,
-                myPoly->type);
+                poly->type);
     }
     return(NAN);
 }
 
-psVector *psPolynomial4DEvalVector(const psPolynomial4D *myPoly,
-                                   const psVector *w,
+psVector *psPolynomial4DEvalVector(const psPolynomial4D *poly,
                                    const psVector *x,
                                    const psVector *y,
-                                   const psVector *z)
-{
-    PS_ASSERT_POLY_NON_NULL(myPoly, NULL);
-    PS_ASSERT_VECTOR_NON_NULL(w, NULL);
-    PS_ASSERT_VECTOR_TYPE(w, PS_TYPE_F32, NULL);
+                                   const psVector *z,
+                                   const psVector *t)
+{
+    PS_ASSERT_POLY_NON_NULL(poly, NULL);
     PS_ASSERT_VECTOR_NON_NULL(x, NULL);
     PS_ASSERT_VECTOR_TYPE(x, PS_TYPE_F32, NULL);
@@ -1399,17 +1397,19 @@
     PS_ASSERT_VECTOR_NON_NULL(z, NULL);
     PS_ASSERT_VECTOR_TYPE(z, PS_TYPE_F32, NULL);
+    PS_ASSERT_VECTOR_NON_NULL(t, NULL);
+    PS_ASSERT_VECTOR_TYPE(t, PS_TYPE_F32, NULL);
 
     psVector *tmp;
-    psS32 vecLen=w->n;
+    psS32 vecLen=x->n;
 
     // Determine output vector size from min of input vectors
+    if (z->n < vecLen) {
+        vecLen = z->n;
+    }
     if (y->n < vecLen) {
         vecLen = y->n;
     }
-    if (x->n < vecLen) {
-        vecLen = x->n;
-    }
-    if (z->n < vecLen) {
-        vecLen = z->n;
+    if (t->n < vecLen) {
+        vecLen = t->n;
     }
 
@@ -1419,9 +1419,9 @@
     // Evaluate polynomial
     for (psS32 i = 0; i < vecLen; i++) {
-        tmp->data.F32[i] = psPolynomial4DEval(myPoly,
-                                              w->data.F32[i],
+        tmp->data.F32[i] = psPolynomial4DEval(poly,
                                               x->data.F32[i],
                                               y->data.F32[i],
-                                              z->data.F32[i]);
+                                              z->data.F32[i],
+                                              t->data.F32[i]);
     }
 
Index: /trunk/psLib/src/dataManip/psFunctions.h
===================================================================
--- /trunk/psLib/src/dataManip/psFunctions.h	(revision 4404)
+++ /trunk/psLib/src/dataManip/psFunctions.h	(revision 4405)
@@ -12,6 +12,6 @@
  *  @author GLG, MHPCC
  *
- *  @version $Revision: 1.48 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2005-06-21 03:01:37 $
+ *  @version $Revision: 1.49 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2005-06-28 00:53:53 $
  *
  *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
@@ -67,5 +67,6 @@
     PS_POLYNOMIAL_ORD,                 ///< Ordinary Polynomial
     PS_POLYNOMIAL_CHEB                 ///< Chebyshev Polynomial
-} psPolynomialType;
+}
+psPolynomialType;
 
 /** One-dimensional polynomial */
@@ -73,5 +74,5 @@
 {
     psPolynomialType type;             ///< Polynomial type
-    psS32 n;                             ///< Number of terms
+    psS32 n;                           ///< Number of terms
     psF32 *coeff;                      ///< Coefficients
     psF32 *coeffErr;                   ///< Error in coefficients
@@ -84,6 +85,6 @@
 {
     psPolynomialType type;             ///< Polynomial type
-    psS32 nX;                            ///< Number of terms in x
-    psS32 nY;                            ///< Number of terms in y
+    psS32 nX;                          ///< Number of terms in x
+    psS32 nY;                          ///< Number of terms in y
     psF32 **coeff;                     ///< Coefficients
     psF32 **coeffErr;                  ///< Error in coefficients
@@ -96,7 +97,7 @@
 {
     psPolynomialType type;             ///< Polynomial type
-    psS32 nX;                            ///< Number of terms in x
-    psS32 nY;                            ///< Number of terms in y
-    psS32 nZ;                            ///< Number of terms in z
+    psS32 nX;                          ///< Number of terms in x
+    psS32 nY;                          ///< Number of terms in y
+    psS32 nZ;                          ///< Number of terms in z
     psF32 ***coeff;                    ///< Coefficients
     psF32 ***coeffErr;                 ///< Error in coefficients
@@ -109,8 +110,8 @@
 {
     psPolynomialType type;             ///< Polynomial type
-    psS32 nW;                            ///< Number of terms in w
-    psS32 nX;                            ///< Number of terms in x
-    psS32 nY;                            ///< Number of terms in y
-    psS32 nZ;                            ///< Number of terms in z
+    psS32 nW;                          ///< Number of terms in w
+    psS32 nX;                          ///< Number of terms in x
+    psS32 nY;                          ///< Number of terms in y
+    psS32 nZ;                          ///< Number of terms in z
     psF32 ****coeff;                   ///< Coefficients
     psF32 ****coeffErr;                ///< Error in coefficients
@@ -125,5 +126,5 @@
  */
 psPolynomial1D* psPolynomial1DAlloc(
-    psS32 n,                            ///< Number of terms
+    psS32 n,                           ///< Number of terms
     psPolynomialType type              ///< Polynomial Type
 );
@@ -134,6 +135,6 @@
  */
 psPolynomial2D* psPolynomial2DAlloc(
-    psS32 nX,                           ///< Number of terms in x
-    psS32 nY,                           ///< Number of terms in y
+    psS32 nX,                          ///< Number of terms in x
+    psS32 nY,                          ///< Number of terms in y
     psPolynomialType type              ///< Polynomial Type
 );
@@ -144,7 +145,7 @@
  */
 psPolynomial3D* psPolynomial3DAlloc(
-    psS32 nX,                           ///< Number of terms in x
-    psS32 nY,                           ///< Number of terms in y
-    psS32 nZ,                           ///< Number of terms in z
+    psS32 nX,                          ///< Number of terms in x
+    psS32 nY,                          ///< Number of terms in y
+    psS32 nZ,                          ///< Number of terms in z
     psPolynomialType type              ///< Polynomial Type
 );
@@ -155,8 +156,8 @@
  */
 psPolynomial4D* psPolynomial4DAlloc(
-    psS32 nW,                           ///< Number of terms in w
-    psS32 nX,                           ///< Number of terms in x
-    psS32 nY,                           ///< Number of terms in y
-    psS32 nZ,                           ///< Number of terms in z
+    psS32 nW,                          ///< Number of terms in w
+    psS32 nX,                          ///< Number of terms in x
+    psS32 nY,                          ///< Number of terms in y
+    psS32 nZ,                          ///< Number of terms in z
     psPolynomialType type              ///< Polynomial Type
 );
@@ -164,42 +165,42 @@
 /** Evaluates a 1-D polynomial at specific coordinates.
  *
- *  @return psF32    result of polynomial at given location
- */
-psF32 psPolynomial1DEval(
-    const psPolynomial1D* myPoly,      ///< Coefficients for the polynomial
-    psF32 x                            ///< location at which to evaluate
+ *  @return psF64    result of polynomial at given location
+ */
+psF64 psPolynomial1DEval(
+    const psPolynomial1D* poly,        ///< Coefficients for the polynomial
+    psF64 x                            ///< location at which to evaluate
 );
 
 /** Evaluates a 2-D polynomial at specific coordinates.
  *
- *  @return psF32    result of polynomial at given location
- */
-psF32 psPolynomial2DEval(
-    const psPolynomial2D* myPoly,      ///< Coefficients for the polynomial
-    psF32 x,                            ///< x location at which to evaluate
-    psF32 y                             ///< y location at which to evaluate
+ *  @return psF64    result of polynomial at given location
+ */
+psF64 psPolynomial2DEval(
+    const psPolynomial2D* poly,         ///< Coefficients for the polynomial
+    psF64 x,                            ///< x location at which to evaluate
+    psF64 y                             ///< y location at which to evaluate
 );
 
 /** Evaluates a 3-D polynomial at specific coordinates.
  *
- *  @return psF32    result of polynomial at given location
- */
-psF32 psPolynomial3DEval(
-    const psPolynomial3D* myPoly,      ///< Coefficients for the polynomial
-    psF32 x,                            ///< x location at which to evaluate
-    psF32 y,                            ///< y location at which to evaluate
-    psF32 z                             ///< z location at which to evaluate
+ *  @return psF64    result of polynomial at given location
+ */
+psF64 psPolynomial3DEval(
+    const psPolynomial3D* poly,        ///< Coefficients for the polynomial
+    psF64 x,                           ///< x location at which to evaluate
+    psF64 y,                           ///< y location at which to evaluate
+    psF64 z                            ///< z location at which to evaluate
 );
 
 /** Evaluates a 4-D polynomial at specific coordinates.
  *
- *  @return psF32    result of polynomial at given location
- */
-psF32 psPolynomial4DEval(
-    const psPolynomial4D* myPoly,      ///< Coefficients for the polynomial
-    psF32 w,                            ///< w location at which to evaluate
-    psF32 x,                            ///< x location at which to evaluate
-    psF32 y,                            ///< y location at which to evaluate
-    psF32 z                             ///< z location at which to evaluate
+ *  @return psF64    result of polynomial at given location
+ */
+psF64 psPolynomial4DEval(
+    const psPolynomial4D* poly,        ///< Coefficients for the polynomial
+    psF64 x,                           ///< x location at which to evaluate
+    psF64 y,                           ///< y location at which to evaluate
+    psF64 z,                           ///< z location at which to evaluate
+    psF64 t                            ///< t location at which to evaluate
 );
 
@@ -209,6 +210,6 @@
  */
 psVector *psPolynomial1DEvalVector(
-    const psPolynomial1D *myPoly,      ///< Coefficients for the polynomial
-    const psVector *x                   ///< x locations at which to evaluate
+    const psPolynomial1D *poly,        ///< Coefficients for the polynomial
+    const psVector *x                  ///< x locations at which to evaluate
 );
 
@@ -218,7 +219,7 @@
  */
 psVector *psPolynomial2DEvalVector(
-    const psPolynomial2D *poly,         ///< Coefficients for the polynomial
-    const psVector *x,                  ///< x locations at which to evaluate
-    const psVector *y                   ///< y locations at which to evaluate
+    const psPolynomial2D *poly,        ///< Coefficients for the polynomial
+    const psVector *x,                 ///< x locations at which to evaluate
+    const psVector *y                  ///< y locations at which to evaluate
 );
 
@@ -228,8 +229,8 @@
  */
 psVector *psPolynomial3DEvalVector(
-    const psPolynomial3D *myPoly,      ///< Coefficients for the polynomial
-    const psVector *x,                  ///< x locations at which to evaluate
-    const psVector *y,                  ///< y locations at which to evaluate
-    const psVector *z                   ///< z locations at which to evaluate
+    const psPolynomial3D *poly,        ///< Coefficients for the polynomial
+    const psVector *x,                 ///< x locations at which to evaluate
+    const psVector *y,                 ///< y locations at which to evaluate
+    const psVector *z                  ///< z locations at which to evaluate
 );
 
@@ -239,9 +240,9 @@
  */
 psVector *psPolynomial4DEvalVector(
-    const psPolynomial4D *myPoly,      ///< Coefficients for the polynomial
-    const psVector *w,                  ///< w locations at which to evaluate
-    const psVector *x,                  ///< x locations at which to evaluate
-    const psVector *y,                  ///< y locations at which to evaluate
-    const psVector *z                   ///< z locations at which to evaluate
+    const psPolynomial4D *poly,        ///< Coefficients for the polynomial
+    const psVector *x,                 ///< x locations at which to evaluate
+    const psVector *y,                 ///< y locations at which to evaluate
+    const psVector *z,                 ///< z locations at which to evaluate
+    const psVector *t                  ///< t locations at which to evaluate
 );
 
@@ -254,5 +255,5 @@
 {
     psPolynomialType type;             ///< Polynomial type
-    psS32 n;                            ///< Number of terms
+    psS32 n;                           ///< Number of terms
     psF64 *coeff;                      ///< Coefficients
     psF64 *coeffErr;                   ///< Error in coefficients
@@ -265,6 +266,6 @@
 {
     psPolynomialType type;             ///< Polynomial type
-    psS32 nX;                           ///< Number of terms in x
-    psS32 nY;                           ///< Number of terms in y
+    psS32 nX;                          ///< Number of terms in x
+    psS32 nY;                          ///< Number of terms in y
     psF64 **coeff;                     ///< Coefficients
     psF64 **coeffErr;                  ///< Error in coefficients
@@ -277,7 +278,7 @@
 {
     psPolynomialType type;             ///< Polynomial type
-    psS32 nX;                           ///< Number of terms in x
-    psS32 nY;                           ///< Number of terms in y
-    psS32 nZ;                           ///< Number of terms in z
+    psS32 nX;                          ///< Number of terms in x
+    psS32 nY;                          ///< Number of terms in y
+    psS32 nZ;                          ///< Number of terms in z
     psF64 ***coeff;                    ///< Coefficients
     psF64 ***coeffErr;                 ///< Error in coefficients
@@ -290,8 +291,8 @@
 {
     psPolynomialType type;             ///< Polynomial type
-    psS32 nW;                           ///< Number of terms in w
-    psS32 nX;                           ///< Number of terms in x
-    psS32 nY;                           ///< Number of terms in y
-    psS32 nZ;                           ///< Number of terms in z
+    psS32 nW;                          ///< Number of terms in w
+    psS32 nX;                          ///< Number of terms in x
+    psS32 nY;                          ///< Number of terms in y
+    psS32 nZ;                          ///< Number of terms in z
     psF64 ****coeff;                   ///< Coefficients
     psF64 ****coeffErr;                ///< Error in coefficients
@@ -305,6 +306,6 @@
  */
 psDPolynomial1D* psDPolynomial1DAlloc(
-    psS32 n,                              ///< Number of terms
-    psPolynomialType type                ///< Polynomial Type
+    psS32 n,                           ///< Number of terms
+    psPolynomialType type              ///< Polynomial Type
 );
 
@@ -314,6 +315,6 @@
  */
 psDPolynomial2D* psDPolynomial2DAlloc(
-    psS32 nX,                           ///< Number of terms in x
-    psS32 nY,                           ///< Number of terms in y
+    psS32 nX,                          ///< Number of terms in x
+    psS32 nY,                          ///< Number of terms in y
     psPolynomialType type              ///< Polynomial Type
 );
@@ -324,7 +325,7 @@
  */
 psDPolynomial3D* psDPolynomial3DAlloc(
-    psS32 nX,                           ///< Number of terms in x
-    psS32 nY,                           ///< Number of terms in y
-    psS32 nZ,                           ///< Number of terms in z
+    psS32 nX,                          ///< Number of terms in x
+    psS32 nY,                          ///< Number of terms in y
+    psS32 nZ,                          ///< Number of terms in z
     psPolynomialType type              ///< Polynomial Type
 );
@@ -335,8 +336,8 @@
  */
 psDPolynomial4D* psDPolynomial4DAlloc(
-    psS32 nW,                           ///< Number of terms in w
-    psS32 nX,                           ///< Number of terms in x
-    psS32 nY,                           ///< Number of terms in y
-    psS32 nZ,                           ///< Number of terms in z
+    psS32 nW,                          ///< Number of terms in w
+    psS32 nX,                          ///< Number of terms in x
+    psS32 nY,                          ///< Number of terms in y
+    psS32 nZ,                          ///< Number of terms in z
     psPolynomialType type              ///< Polynomial Type
 );
@@ -348,5 +349,5 @@
 psF64 psDPolynomial1DEval(
     const psDPolynomial1D* myPoly,     ///< Coefficients for the polynomial
-    psF64 x                             ///< Value at which to evaluate
+    psF64 x                            ///< Value at which to evaluate
 );
 
@@ -357,29 +358,29 @@
 psF64 psDPolynomial2DEval(
     const psDPolynomial2D* myPoly,      ///< Coefficients for the polynomial
-    psF64 x,                             ///< Value x at which to evaluate
-    psF64 y                              ///< Value y at which to evaluate
+    psF64 x,                            ///< Value x at which to evaluate
+    psF64 y                             ///< Value y at which to evaluate
 );
 
 /** Evaluates a double-precision 3-D polynomial at specific coordinates.
  *
- *  @return psF32    result of polynomial at given location
+ *  @return psF64    result of polynomial at given location
  */
 psF64 psDPolynomial3DEval(
     const psDPolynomial3D* myPoly,     ///< Coefficients for the polynomial
-    psF64 x,                            ///< Value x at which to evaluate
-    psF64 y,                            ///< Value y at which to evaluate
-    psF64 z                             ///< Value z at which to evaluate
+    psF64 x,                           ///< Value x at which to evaluate
+    psF64 y,                           ///< Value y at which to evaluate
+    psF64 z                            ///< Value z at which to evaluate
 );
 
 /** Evaluates a double-precision 4-D polynomial at specific coordinates.
  *
- *  @return psF32    result of polynomial at given location
+ *  @return psF64    result of polynomial at given location
  */
 psF64 psDPolynomial4DEval(
     const psDPolynomial4D* myPoly,     ///< Coefficients for the polynomial
-    psF64 w,                            ///< Value w at which to evaluate
-    psF64 x,                            ///< Value x at which to evaluate
-    psF64 y,                            ///< Value y at which to evaluate
-    psF64 z                             ///< Value z at which to evaluate
+    psF64 w,                           ///< Value w at which to evaluate
+    psF64 x,                           ///< Value x at which to evaluate
+    psF64 y,                           ///< Value y at which to evaluate
+    psF64 z                            ///< Value z at which to evaluate
 );
 
@@ -390,5 +391,5 @@
 psVector *psDPolynomial1DEvalVector(
     const psDPolynomial1D *myPoly,     ///< Coefficients for the polynomial
-    const psVector *x                   ///< x locations at which to evaluate
+    const psVector *x                  ///< x locations at which to evaluate
 );
 
@@ -399,6 +400,6 @@
 psVector *psDPolynomial2DEvalVector(
     const psDPolynomial2D *myPoly,     ///< Coefficients for the polynomial
-    const psVector *x,                  ///< x locations at which to evaluate
-    const psVector *y                   ///< y locations at which to evaluate
+    const psVector *x,                 ///< x locations at which to evaluate
+    const psVector *y                  ///< y locations at which to evaluate
 );
 
@@ -409,7 +410,7 @@
 psVector *psDPolynomial3DEvalVector(
     const psDPolynomial3D *myPoly,     ///< Coefficients for the polynomial
-    const psVector *x,                  ///< x locations at which to evaluate
-    const psVector *y,                  ///< y locations at which to evaluate
-    const psVector *z                   ///< z locations at which to evaluate
+    const psVector *x,                 ///< x locations at which to evaluate
+    const psVector *y,                 ///< y locations at which to evaluate
+    const psVector *z                  ///< z locations at which to evaluate
 );
 
@@ -420,8 +421,8 @@
 psVector *psDPolynomial4DEvalVector(
     const psDPolynomial4D *myPoly,     ///< Coefficients for the polynomial
-    const psVector *w,                  ///< w locations at which to evaluate
-    const psVector *x,                  ///< x locations at which to evaluate
-    const psVector *y,                  ///< y locations at which to evaluate
-    const psVector *z                   ///< z locations at which to evaluate
+    const psVector *w,                 ///< w locations at which to evaluate
+    const psVector *x,                 ///< x locations at which to evaluate
+    const psVector *y,                 ///< y locations at which to evaluate
+    const psVector *z                  ///< z locations at which to evaluate
 );
 
@@ -429,5 +430,5 @@
 typedef struct
 {
-    psS32 n;                            ///< The number of spline polynomials
+    psS32 n;                           ///< The number of spline polynomials
     psPolynomial1D **spline;           ///< An array of n pointers to the spline polynomials
     psF32 *p_psDeriv2;                 ///< For cubic splines, the second derivative at each domain point.  Size is n+1.
@@ -444,8 +445,10 @@
  *  @return psSpline1D*    new 1-D spline struct
  */
-psSpline1D *psSpline1DAlloc(int n,               ///< Number of spline polynomials
-                            int order,           ///< Order of spline polynomials
-                            float min,           ///< Lower boundary value of spline polynomials
-                            float max);          ///< Upper boundary value of spline polynomials
+psSpline1D *psSpline1DAlloc(
+    int n,                             ///< Number of spline polynomials
+    int order,                         ///< Order of spline polynomials
+    float min,                         ///< Lower boundary value of spline polynomials
+    float max                          ///< Upper boundary value of spline polynomials
+);
 
 /** Allocates a psSpline1D structure
@@ -455,6 +458,8 @@
  *  @return psSpline1D*    new 1-D spline struct
  */
-psSpline1D *psSpline1DAllocGeneric(const psVector *bounds,   ///< Bounds for spline polynomials
-                                   int order);               ///< Order of spline polynomials
+psSpline1D *psSpline1DAllocGeneric(
+    const psVector *bounds,            ///< Bounds for spline polynomials
+    int order                          ///< Order of spline polynomials
+);
 
 /** Evaluates 1-D spline polynomials at a specific coordinate.
@@ -481,6 +486,8 @@
  *  @return psS32    corresponding index number of specified value
  */
-psS32 p_psVectorBinDisect(psVector *bins,        ///< Array of non-decreasing values
-                          psScalar *x);          ///< Target value to find
+psS32 p_psVectorBinDisect(
+    psVector *bins,                    ///< Array of non-decreasing values
+    psScalar *x                        ///< Target value to find
+);
 
 /** Interpolates a series of data points for evaluation at a specific coordinate.  Uses a
@@ -489,8 +496,10 @@
  *  @return psScalar*    Lagrange interpolation value at given location
  */
-psScalar *p_psVectorInterpolate(psVector *domain,     ///< Domain (x coords) for interpolation
-                                psVector *range,      ///< Range (y coords) for interpolation
-                                psS32 order,          ///< Order of interpolation function
-                                psScalar *x);         ///< Location at which to evaluate
+psScalar *p_psVectorInterpolate(
+    psVector *domain,                  ///< Domain (x coords) for interpolation
+    psVector *range,                   ///< Range (y coords) for interpolation
+    psS32 order,                       ///< Order of interpolation function
+    psScalar *x                        ///< Location at which to evaluate
+);
 
 #if 0
Index: /trunk/psLib/src/math/psPolynomial.c
===================================================================
--- /trunk/psLib/src/math/psPolynomial.c	(revision 4404)
+++ /trunk/psLib/src/math/psPolynomial.c	(revision 4405)
@@ -7,6 +7,6 @@
  *  polynomials.  It also contains a Gaussian functions.
  *
- *  @version $Revision: 1.111 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2005-06-25 02:02:05 $
+ *  @version $Revision: 1.112 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2005-06-28 00:53:53 $
  *
  *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
@@ -1232,24 +1232,24 @@
 }
 
-psF32 psPolynomial1DEval(const psPolynomial1D* myPoly, psF32 x)
-{
-    PS_ASSERT_POLY_NON_NULL(myPoly, NAN);
-
-    if (myPoly->type == PS_POLYNOMIAL_ORD) {
-        return(ordPolynomial1DEval(x, myPoly));
-    } else if (myPoly->type == PS_POLYNOMIAL_CHEB) {
-        return(chebPolynomial1DEval(x, myPoly));
+psF64 psPolynomial1DEval(const psPolynomial1D* poly, psF64 x)
+{
+    PS_ASSERT_POLY_NON_NULL(poly, NAN);
+
+    if (poly->type == PS_POLYNOMIAL_ORD) {
+        return(ordPolynomial1DEval(x, poly));
+    } else if (poly->type == PS_POLYNOMIAL_CHEB) {
+        return(chebPolynomial1DEval(x, poly));
     } else {
         psError(PS_ERR_BAD_PARAMETER_TYPE, true,
                 PS_ERRORTEXT_psFunctions_INVALID_POLYNOMIAL_TYPE,
-                myPoly->type);
+                poly->type);
     }
     return(NAN);
 }
 
-psVector *psPolynomial1DEvalVector(const psPolynomial1D *myPoly,
+psVector *psPolynomial1DEvalVector(const psPolynomial1D *poly,
                                    const psVector *x)
 {
-    PS_ASSERT_POLY_NON_NULL(myPoly, NULL);
+    PS_ASSERT_POLY_NON_NULL(poly, NULL);
     PS_ASSERT_VECTOR_NON_NULL(x, NULL);
     PS_ASSERT_VECTOR_TYPE(x, PS_TYPE_F32, NULL);
@@ -1259,5 +1259,5 @@
     tmp = psVectorAlloc(x->n, PS_TYPE_F32);
     for (psS32 i=0;i<x->n;i++) {
-        tmp->data.F32[i] = psPolynomial1DEval(myPoly, x->data.F32[i]);
+        tmp->data.F32[i] = psPolynomial1DEval(poly, x->data.F32[i]);
     }
 
@@ -1265,26 +1265,26 @@
 }
 
-psF32 psPolynomial2DEval(const psPolynomial2D* myPoly, psF32 x, psF32 y)
-{
-    PS_ASSERT_POLY_NON_NULL(myPoly, NAN);
-
-    if (myPoly->type == PS_POLYNOMIAL_ORD) {
-        return(ordPolynomial2DEval(x, y, myPoly));
-    } else if (myPoly->type == PS_POLYNOMIAL_CHEB) {
-        return(chebPolynomial2DEval(x, y, myPoly));
+psF64 psPolynomial2DEval(const psPolynomial2D* poly, psF64 x, psF64 y)
+{
+    PS_ASSERT_POLY_NON_NULL(poly, NAN);
+
+    if (poly->type == PS_POLYNOMIAL_ORD) {
+        return(ordPolynomial2DEval(x, y, poly));
+    } else if (poly->type == PS_POLYNOMIAL_CHEB) {
+        return(chebPolynomial2DEval(x, y, poly));
     } else {
         psError(PS_ERR_BAD_PARAMETER_TYPE, true,
                 PS_ERRORTEXT_psFunctions_INVALID_POLYNOMIAL_TYPE,
-                myPoly->type);
+                poly->type);
     }
     return(NAN);
 }
 
-psVector *psPolynomial2DEvalVector(const psPolynomial2D *myPoly,
+psVector *psPolynomial2DEvalVector(const psPolynomial2D *poly,
                                    const psVector *x,
                                    const psVector *y)
 
 {
-    PS_ASSERT_POLY_NON_NULL(myPoly, NULL);
+    PS_ASSERT_POLY_NON_NULL(poly, NULL);
     PS_ASSERT_VECTOR_NON_NULL(x, NULL);
     PS_ASSERT_VECTOR_TYPE(x, PS_TYPE_F32, NULL);
@@ -1305,5 +1305,5 @@
     // Evaluate the polynomial at the specified points
     for (psS32 i=0; i<vecLen; i++) {
-        tmp->data.F32[i] = psPolynomial2DEval(myPoly,x->data.F32[i],y->data.F32[i]);
+        tmp->data.F32[i] = psPolynomial2DEval(poly,x->data.F32[i],y->data.F32[i]);
     }
 
@@ -1312,21 +1312,21 @@
 }
 
-psF32 psPolynomial3DEval(const psPolynomial3D* myPoly, psF32 x, psF32 y, psF32 z)
-{
-    PS_ASSERT_POLY_NON_NULL(myPoly, NAN);
-
-    if (myPoly->type == PS_POLYNOMIAL_ORD) {
-        return(ordPolynomial3DEval(x, y, z, myPoly));
-    } else if (myPoly->type == PS_POLYNOMIAL_CHEB) {
-        return(chebPolynomial3DEval(x, y, z, myPoly));
+psF64 psPolynomial3DEval(const psPolynomial3D* poly, psF64 x, psF64 y, psF64 z)
+{
+    PS_ASSERT_POLY_NON_NULL(poly, NAN);
+
+    if (poly->type == PS_POLYNOMIAL_ORD) {
+        return(ordPolynomial3DEval(x, y, z, poly));
+    } else if (poly->type == PS_POLYNOMIAL_CHEB) {
+        return(chebPolynomial3DEval(x, y, z, poly));
     } else {
         psError(PS_ERR_BAD_PARAMETER_TYPE, true,
                 PS_ERRORTEXT_psFunctions_INVALID_POLYNOMIAL_TYPE,
-                myPoly->type);
+                poly->type);
     }
     return(NAN);
 }
 
-psVector *psPolynomial3DEvalVector(const psPolynomial3D *myPoly,
+psVector *psPolynomial3DEvalVector(const psPolynomial3D *poly,
                                    const psVector *x,
                                    const psVector *y,
@@ -1334,5 +1334,5 @@
 
 {
-    PS_ASSERT_POLY_NON_NULL(myPoly, NULL);
+    PS_ASSERT_POLY_NON_NULL(poly, NULL);
     PS_ASSERT_VECTOR_NON_NULL(x, NULL);
     PS_ASSERT_VECTOR_TYPE(x, PS_TYPE_F32, NULL);
@@ -1358,5 +1358,5 @@
     // Evaluate polynomial
     for (psS32 i = 0; i < vecLen; i++) {
-        tmp->data.F32[i] = psPolynomial3DEval(myPoly,
+        tmp->data.F32[i] = psPolynomial3DEval(poly,
                                               x->data.F32[i],
                                               y->data.F32[i],
@@ -1368,29 +1368,27 @@
 }
 
-psF32 psPolynomial4DEval(const psPolynomial4D* myPoly, psF32 w, psF32 x, psF32 y, psF32 z)
-{
-    PS_ASSERT_POLY_NON_NULL(myPoly, NAN);
-
-    if (myPoly->type == PS_POLYNOMIAL_ORD) {
-        return(ordPolynomial4DEval(w,x,y,z, myPoly));
-    } else if (myPoly->type == PS_POLYNOMIAL_CHEB) {
-        return(chebPolynomial4DEval(w,x,y,z, myPoly));
+psF64 psPolynomial4DEval(const psPolynomial4D* poly, psF64 x, psF64 y, psF64 z, psF64 t)
+{
+    PS_ASSERT_POLY_NON_NULL(poly, NAN);
+
+    if (poly->type == PS_POLYNOMIAL_ORD) {
+        return(ordPolynomial4DEval(x,y,z,t, poly));
+    } else if (poly->type == PS_POLYNOMIAL_CHEB) {
+        return(chebPolynomial4DEval(x,y,z,t, poly));
     } else {
         psError(PS_ERR_BAD_PARAMETER_TYPE, true,
                 PS_ERRORTEXT_psFunctions_INVALID_POLYNOMIAL_TYPE,
-                myPoly->type);
+                poly->type);
     }
     return(NAN);
 }
 
-psVector *psPolynomial4DEvalVector(const psPolynomial4D *myPoly,
-                                   const psVector *w,
+psVector *psPolynomial4DEvalVector(const psPolynomial4D *poly,
                                    const psVector *x,
                                    const psVector *y,
-                                   const psVector *z)
-{
-    PS_ASSERT_POLY_NON_NULL(myPoly, NULL);
-    PS_ASSERT_VECTOR_NON_NULL(w, NULL);
-    PS_ASSERT_VECTOR_TYPE(w, PS_TYPE_F32, NULL);
+                                   const psVector *z,
+                                   const psVector *t)
+{
+    PS_ASSERT_POLY_NON_NULL(poly, NULL);
     PS_ASSERT_VECTOR_NON_NULL(x, NULL);
     PS_ASSERT_VECTOR_TYPE(x, PS_TYPE_F32, NULL);
@@ -1399,17 +1397,19 @@
     PS_ASSERT_VECTOR_NON_NULL(z, NULL);
     PS_ASSERT_VECTOR_TYPE(z, PS_TYPE_F32, NULL);
+    PS_ASSERT_VECTOR_NON_NULL(t, NULL);
+    PS_ASSERT_VECTOR_TYPE(t, PS_TYPE_F32, NULL);
 
     psVector *tmp;
-    psS32 vecLen=w->n;
+    psS32 vecLen=x->n;
 
     // Determine output vector size from min of input vectors
+    if (z->n < vecLen) {
+        vecLen = z->n;
+    }
     if (y->n < vecLen) {
         vecLen = y->n;
     }
-    if (x->n < vecLen) {
-        vecLen = x->n;
-    }
-    if (z->n < vecLen) {
-        vecLen = z->n;
+    if (t->n < vecLen) {
+        vecLen = t->n;
     }
 
@@ -1419,9 +1419,9 @@
     // Evaluate polynomial
     for (psS32 i = 0; i < vecLen; i++) {
-        tmp->data.F32[i] = psPolynomial4DEval(myPoly,
-                                              w->data.F32[i],
+        tmp->data.F32[i] = psPolynomial4DEval(poly,
                                               x->data.F32[i],
                                               y->data.F32[i],
-                                              z->data.F32[i]);
+                                              z->data.F32[i],
+                                              t->data.F32[i]);
     }
 
Index: /trunk/psLib/src/math/psPolynomial.h
===================================================================
--- /trunk/psLib/src/math/psPolynomial.h	(revision 4404)
+++ /trunk/psLib/src/math/psPolynomial.h	(revision 4405)
@@ -12,6 +12,6 @@
  *  @author GLG, MHPCC
  *
- *  @version $Revision: 1.48 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2005-06-21 03:01:37 $
+ *  @version $Revision: 1.49 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2005-06-28 00:53:53 $
  *
  *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
@@ -67,5 +67,6 @@
     PS_POLYNOMIAL_ORD,                 ///< Ordinary Polynomial
     PS_POLYNOMIAL_CHEB                 ///< Chebyshev Polynomial
-} psPolynomialType;
+}
+psPolynomialType;
 
 /** One-dimensional polynomial */
@@ -73,5 +74,5 @@
 {
     psPolynomialType type;             ///< Polynomial type
-    psS32 n;                             ///< Number of terms
+    psS32 n;                           ///< Number of terms
     psF32 *coeff;                      ///< Coefficients
     psF32 *coeffErr;                   ///< Error in coefficients
@@ -84,6 +85,6 @@
 {
     psPolynomialType type;             ///< Polynomial type
-    psS32 nX;                            ///< Number of terms in x
-    psS32 nY;                            ///< Number of terms in y
+    psS32 nX;                          ///< Number of terms in x
+    psS32 nY;                          ///< Number of terms in y
     psF32 **coeff;                     ///< Coefficients
     psF32 **coeffErr;                  ///< Error in coefficients
@@ -96,7 +97,7 @@
 {
     psPolynomialType type;             ///< Polynomial type
-    psS32 nX;                            ///< Number of terms in x
-    psS32 nY;                            ///< Number of terms in y
-    psS32 nZ;                            ///< Number of terms in z
+    psS32 nX;                          ///< Number of terms in x
+    psS32 nY;                          ///< Number of terms in y
+    psS32 nZ;                          ///< Number of terms in z
     psF32 ***coeff;                    ///< Coefficients
     psF32 ***coeffErr;                 ///< Error in coefficients
@@ -109,8 +110,8 @@
 {
     psPolynomialType type;             ///< Polynomial type
-    psS32 nW;                            ///< Number of terms in w
-    psS32 nX;                            ///< Number of terms in x
-    psS32 nY;                            ///< Number of terms in y
-    psS32 nZ;                            ///< Number of terms in z
+    psS32 nW;                          ///< Number of terms in w
+    psS32 nX;                          ///< Number of terms in x
+    psS32 nY;                          ///< Number of terms in y
+    psS32 nZ;                          ///< Number of terms in z
     psF32 ****coeff;                   ///< Coefficients
     psF32 ****coeffErr;                ///< Error in coefficients
@@ -125,5 +126,5 @@
  */
 psPolynomial1D* psPolynomial1DAlloc(
-    psS32 n,                            ///< Number of terms
+    psS32 n,                           ///< Number of terms
     psPolynomialType type              ///< Polynomial Type
 );
@@ -134,6 +135,6 @@
  */
 psPolynomial2D* psPolynomial2DAlloc(
-    psS32 nX,                           ///< Number of terms in x
-    psS32 nY,                           ///< Number of terms in y
+    psS32 nX,                          ///< Number of terms in x
+    psS32 nY,                          ///< Number of terms in y
     psPolynomialType type              ///< Polynomial Type
 );
@@ -144,7 +145,7 @@
  */
 psPolynomial3D* psPolynomial3DAlloc(
-    psS32 nX,                           ///< Number of terms in x
-    psS32 nY,                           ///< Number of terms in y
-    psS32 nZ,                           ///< Number of terms in z
+    psS32 nX,                          ///< Number of terms in x
+    psS32 nY,                          ///< Number of terms in y
+    psS32 nZ,                          ///< Number of terms in z
     psPolynomialType type              ///< Polynomial Type
 );
@@ -155,8 +156,8 @@
  */
 psPolynomial4D* psPolynomial4DAlloc(
-    psS32 nW,                           ///< Number of terms in w
-    psS32 nX,                           ///< Number of terms in x
-    psS32 nY,                           ///< Number of terms in y
-    psS32 nZ,                           ///< Number of terms in z
+    psS32 nW,                          ///< Number of terms in w
+    psS32 nX,                          ///< Number of terms in x
+    psS32 nY,                          ///< Number of terms in y
+    psS32 nZ,                          ///< Number of terms in z
     psPolynomialType type              ///< Polynomial Type
 );
@@ -164,42 +165,42 @@
 /** Evaluates a 1-D polynomial at specific coordinates.
  *
- *  @return psF32    result of polynomial at given location
- */
-psF32 psPolynomial1DEval(
-    const psPolynomial1D* myPoly,      ///< Coefficients for the polynomial
-    psF32 x                            ///< location at which to evaluate
+ *  @return psF64    result of polynomial at given location
+ */
+psF64 psPolynomial1DEval(
+    const psPolynomial1D* poly,        ///< Coefficients for the polynomial
+    psF64 x                            ///< location at which to evaluate
 );
 
 /** Evaluates a 2-D polynomial at specific coordinates.
  *
- *  @return psF32    result of polynomial at given location
- */
-psF32 psPolynomial2DEval(
-    const psPolynomial2D* myPoly,      ///< Coefficients for the polynomial
-    psF32 x,                            ///< x location at which to evaluate
-    psF32 y                             ///< y location at which to evaluate
+ *  @return psF64    result of polynomial at given location
+ */
+psF64 psPolynomial2DEval(
+    const psPolynomial2D* poly,         ///< Coefficients for the polynomial
+    psF64 x,                            ///< x location at which to evaluate
+    psF64 y                             ///< y location at which to evaluate
 );
 
 /** Evaluates a 3-D polynomial at specific coordinates.
  *
- *  @return psF32    result of polynomial at given location
- */
-psF32 psPolynomial3DEval(
-    const psPolynomial3D* myPoly,      ///< Coefficients for the polynomial
-    psF32 x,                            ///< x location at which to evaluate
-    psF32 y,                            ///< y location at which to evaluate
-    psF32 z                             ///< z location at which to evaluate
+ *  @return psF64    result of polynomial at given location
+ */
+psF64 psPolynomial3DEval(
+    const psPolynomial3D* poly,        ///< Coefficients for the polynomial
+    psF64 x,                           ///< x location at which to evaluate
+    psF64 y,                           ///< y location at which to evaluate
+    psF64 z                            ///< z location at which to evaluate
 );
 
 /** Evaluates a 4-D polynomial at specific coordinates.
  *
- *  @return psF32    result of polynomial at given location
- */
-psF32 psPolynomial4DEval(
-    const psPolynomial4D* myPoly,      ///< Coefficients for the polynomial
-    psF32 w,                            ///< w location at which to evaluate
-    psF32 x,                            ///< x location at which to evaluate
-    psF32 y,                            ///< y location at which to evaluate
-    psF32 z                             ///< z location at which to evaluate
+ *  @return psF64    result of polynomial at given location
+ */
+psF64 psPolynomial4DEval(
+    const psPolynomial4D* poly,        ///< Coefficients for the polynomial
+    psF64 x,                           ///< x location at which to evaluate
+    psF64 y,                           ///< y location at which to evaluate
+    psF64 z,                           ///< z location at which to evaluate
+    psF64 t                            ///< t location at which to evaluate
 );
 
@@ -209,6 +210,6 @@
  */
 psVector *psPolynomial1DEvalVector(
-    const psPolynomial1D *myPoly,      ///< Coefficients for the polynomial
-    const psVector *x                   ///< x locations at which to evaluate
+    const psPolynomial1D *poly,        ///< Coefficients for the polynomial
+    const psVector *x                  ///< x locations at which to evaluate
 );
 
@@ -218,7 +219,7 @@
  */
 psVector *psPolynomial2DEvalVector(
-    const psPolynomial2D *poly,         ///< Coefficients for the polynomial
-    const psVector *x,                  ///< x locations at which to evaluate
-    const psVector *y                   ///< y locations at which to evaluate
+    const psPolynomial2D *poly,        ///< Coefficients for the polynomial
+    const psVector *x,                 ///< x locations at which to evaluate
+    const psVector *y                  ///< y locations at which to evaluate
 );
 
@@ -228,8 +229,8 @@
  */
 psVector *psPolynomial3DEvalVector(
-    const psPolynomial3D *myPoly,      ///< Coefficients for the polynomial
-    const psVector *x,                  ///< x locations at which to evaluate
-    const psVector *y,                  ///< y locations at which to evaluate
-    const psVector *z                   ///< z locations at which to evaluate
+    const psPolynomial3D *poly,        ///< Coefficients for the polynomial
+    const psVector *x,                 ///< x locations at which to evaluate
+    const psVector *y,                 ///< y locations at which to evaluate
+    const psVector *z                  ///< z locations at which to evaluate
 );
 
@@ -239,9 +240,9 @@
  */
 psVector *psPolynomial4DEvalVector(
-    const psPolynomial4D *myPoly,      ///< Coefficients for the polynomial
-    const psVector *w,                  ///< w locations at which to evaluate
-    const psVector *x,                  ///< x locations at which to evaluate
-    const psVector *y,                  ///< y locations at which to evaluate
-    const psVector *z                   ///< z locations at which to evaluate
+    const psPolynomial4D *poly,        ///< Coefficients for the polynomial
+    const psVector *x,                 ///< x locations at which to evaluate
+    const psVector *y,                 ///< y locations at which to evaluate
+    const psVector *z,                 ///< z locations at which to evaluate
+    const psVector *t                  ///< t locations at which to evaluate
 );
 
@@ -254,5 +255,5 @@
 {
     psPolynomialType type;             ///< Polynomial type
-    psS32 n;                            ///< Number of terms
+    psS32 n;                           ///< Number of terms
     psF64 *coeff;                      ///< Coefficients
     psF64 *coeffErr;                   ///< Error in coefficients
@@ -265,6 +266,6 @@
 {
     psPolynomialType type;             ///< Polynomial type
-    psS32 nX;                           ///< Number of terms in x
-    psS32 nY;                           ///< Number of terms in y
+    psS32 nX;                          ///< Number of terms in x
+    psS32 nY;                          ///< Number of terms in y
     psF64 **coeff;                     ///< Coefficients
     psF64 **coeffErr;                  ///< Error in coefficients
@@ -277,7 +278,7 @@
 {
     psPolynomialType type;             ///< Polynomial type
-    psS32 nX;                           ///< Number of terms in x
-    psS32 nY;                           ///< Number of terms in y
-    psS32 nZ;                           ///< Number of terms in z
+    psS32 nX;                          ///< Number of terms in x
+    psS32 nY;                          ///< Number of terms in y
+    psS32 nZ;                          ///< Number of terms in z
     psF64 ***coeff;                    ///< Coefficients
     psF64 ***coeffErr;                 ///< Error in coefficients
@@ -290,8 +291,8 @@
 {
     psPolynomialType type;             ///< Polynomial type
-    psS32 nW;                           ///< Number of terms in w
-    psS32 nX;                           ///< Number of terms in x
-    psS32 nY;                           ///< Number of terms in y
-    psS32 nZ;                           ///< Number of terms in z
+    psS32 nW;                          ///< Number of terms in w
+    psS32 nX;                          ///< Number of terms in x
+    psS32 nY;                          ///< Number of terms in y
+    psS32 nZ;                          ///< Number of terms in z
     psF64 ****coeff;                   ///< Coefficients
     psF64 ****coeffErr;                ///< Error in coefficients
@@ -305,6 +306,6 @@
  */
 psDPolynomial1D* psDPolynomial1DAlloc(
-    psS32 n,                              ///< Number of terms
-    psPolynomialType type                ///< Polynomial Type
+    psS32 n,                           ///< Number of terms
+    psPolynomialType type              ///< Polynomial Type
 );
 
@@ -314,6 +315,6 @@
  */
 psDPolynomial2D* psDPolynomial2DAlloc(
-    psS32 nX,                           ///< Number of terms in x
-    psS32 nY,                           ///< Number of terms in y
+    psS32 nX,                          ///< Number of terms in x
+    psS32 nY,                          ///< Number of terms in y
     psPolynomialType type              ///< Polynomial Type
 );
@@ -324,7 +325,7 @@
  */
 psDPolynomial3D* psDPolynomial3DAlloc(
-    psS32 nX,                           ///< Number of terms in x
-    psS32 nY,                           ///< Number of terms in y
-    psS32 nZ,                           ///< Number of terms in z
+    psS32 nX,                          ///< Number of terms in x
+    psS32 nY,                          ///< Number of terms in y
+    psS32 nZ,                          ///< Number of terms in z
     psPolynomialType type              ///< Polynomial Type
 );
@@ -335,8 +336,8 @@
  */
 psDPolynomial4D* psDPolynomial4DAlloc(
-    psS32 nW,                           ///< Number of terms in w
-    psS32 nX,                           ///< Number of terms in x
-    psS32 nY,                           ///< Number of terms in y
-    psS32 nZ,                           ///< Number of terms in z
+    psS32 nW,                          ///< Number of terms in w
+    psS32 nX,                          ///< Number of terms in x
+    psS32 nY,                          ///< Number of terms in y
+    psS32 nZ,                          ///< Number of terms in z
     psPolynomialType type              ///< Polynomial Type
 );
@@ -348,5 +349,5 @@
 psF64 psDPolynomial1DEval(
     const psDPolynomial1D* myPoly,     ///< Coefficients for the polynomial
-    psF64 x                             ///< Value at which to evaluate
+    psF64 x                            ///< Value at which to evaluate
 );
 
@@ -357,29 +358,29 @@
 psF64 psDPolynomial2DEval(
     const psDPolynomial2D* myPoly,      ///< Coefficients for the polynomial
-    psF64 x,                             ///< Value x at which to evaluate
-    psF64 y                              ///< Value y at which to evaluate
+    psF64 x,                            ///< Value x at which to evaluate
+    psF64 y                             ///< Value y at which to evaluate
 );
 
 /** Evaluates a double-precision 3-D polynomial at specific coordinates.
  *
- *  @return psF32    result of polynomial at given location
+ *  @return psF64    result of polynomial at given location
  */
 psF64 psDPolynomial3DEval(
     const psDPolynomial3D* myPoly,     ///< Coefficients for the polynomial
-    psF64 x,                            ///< Value x at which to evaluate
-    psF64 y,                            ///< Value y at which to evaluate
-    psF64 z                             ///< Value z at which to evaluate
+    psF64 x,                           ///< Value x at which to evaluate
+    psF64 y,                           ///< Value y at which to evaluate
+    psF64 z                            ///< Value z at which to evaluate
 );
 
 /** Evaluates a double-precision 4-D polynomial at specific coordinates.
  *
- *  @return psF32    result of polynomial at given location
+ *  @return psF64    result of polynomial at given location
  */
 psF64 psDPolynomial4DEval(
     const psDPolynomial4D* myPoly,     ///< Coefficients for the polynomial
-    psF64 w,                            ///< Value w at which to evaluate
-    psF64 x,                            ///< Value x at which to evaluate
-    psF64 y,                            ///< Value y at which to evaluate
-    psF64 z                             ///< Value z at which to evaluate
+    psF64 w,                           ///< Value w at which to evaluate
+    psF64 x,                           ///< Value x at which to evaluate
+    psF64 y,                           ///< Value y at which to evaluate
+    psF64 z                            ///< Value z at which to evaluate
 );
 
@@ -390,5 +391,5 @@
 psVector *psDPolynomial1DEvalVector(
     const psDPolynomial1D *myPoly,     ///< Coefficients for the polynomial
-    const psVector *x                   ///< x locations at which to evaluate
+    const psVector *x                  ///< x locations at which to evaluate
 );
 
@@ -399,6 +400,6 @@
 psVector *psDPolynomial2DEvalVector(
     const psDPolynomial2D *myPoly,     ///< Coefficients for the polynomial
-    const psVector *x,                  ///< x locations at which to evaluate
-    const psVector *y                   ///< y locations at which to evaluate
+    const psVector *x,                 ///< x locations at which to evaluate
+    const psVector *y                  ///< y locations at which to evaluate
 );
 
@@ -409,7 +410,7 @@
 psVector *psDPolynomial3DEvalVector(
     const psDPolynomial3D *myPoly,     ///< Coefficients for the polynomial
-    const psVector *x,                  ///< x locations at which to evaluate
-    const psVector *y,                  ///< y locations at which to evaluate
-    const psVector *z                   ///< z locations at which to evaluate
+    const psVector *x,                 ///< x locations at which to evaluate
+    const psVector *y,                 ///< y locations at which to evaluate
+    const psVector *z                  ///< z locations at which to evaluate
 );
 
@@ -420,8 +421,8 @@
 psVector *psDPolynomial4DEvalVector(
     const psDPolynomial4D *myPoly,     ///< Coefficients for the polynomial
-    const psVector *w,                  ///< w locations at which to evaluate
-    const psVector *x,                  ///< x locations at which to evaluate
-    const psVector *y,                  ///< y locations at which to evaluate
-    const psVector *z                   ///< z locations at which to evaluate
+    const psVector *w,                 ///< w locations at which to evaluate
+    const psVector *x,                 ///< x locations at which to evaluate
+    const psVector *y,                 ///< y locations at which to evaluate
+    const psVector *z                  ///< z locations at which to evaluate
 );
 
@@ -429,5 +430,5 @@
 typedef struct
 {
-    psS32 n;                            ///< The number of spline polynomials
+    psS32 n;                           ///< The number of spline polynomials
     psPolynomial1D **spline;           ///< An array of n pointers to the spline polynomials
     psF32 *p_psDeriv2;                 ///< For cubic splines, the second derivative at each domain point.  Size is n+1.
@@ -444,8 +445,10 @@
  *  @return psSpline1D*    new 1-D spline struct
  */
-psSpline1D *psSpline1DAlloc(int n,               ///< Number of spline polynomials
-                            int order,           ///< Order of spline polynomials
-                            float min,           ///< Lower boundary value of spline polynomials
-                            float max);          ///< Upper boundary value of spline polynomials
+psSpline1D *psSpline1DAlloc(
+    int n,                             ///< Number of spline polynomials
+    int order,                         ///< Order of spline polynomials
+    float min,                         ///< Lower boundary value of spline polynomials
+    float max                          ///< Upper boundary value of spline polynomials
+);
 
 /** Allocates a psSpline1D structure
@@ -455,6 +458,8 @@
  *  @return psSpline1D*    new 1-D spline struct
  */
-psSpline1D *psSpline1DAllocGeneric(const psVector *bounds,   ///< Bounds for spline polynomials
-                                   int order);               ///< Order of spline polynomials
+psSpline1D *psSpline1DAllocGeneric(
+    const psVector *bounds,            ///< Bounds for spline polynomials
+    int order                          ///< Order of spline polynomials
+);
 
 /** Evaluates 1-D spline polynomials at a specific coordinate.
@@ -481,6 +486,8 @@
  *  @return psS32    corresponding index number of specified value
  */
-psS32 p_psVectorBinDisect(psVector *bins,        ///< Array of non-decreasing values
-                          psScalar *x);          ///< Target value to find
+psS32 p_psVectorBinDisect(
+    psVector *bins,                    ///< Array of non-decreasing values
+    psScalar *x                        ///< Target value to find
+);
 
 /** Interpolates a series of data points for evaluation at a specific coordinate.  Uses a
@@ -489,8 +496,10 @@
  *  @return psScalar*    Lagrange interpolation value at given location
  */
-psScalar *p_psVectorInterpolate(psVector *domain,     ///< Domain (x coords) for interpolation
-                                psVector *range,      ///< Range (y coords) for interpolation
-                                psS32 order,          ///< Order of interpolation function
-                                psScalar *x);         ///< Location at which to evaluate
+psScalar *p_psVectorInterpolate(
+    psVector *domain,                  ///< Domain (x coords) for interpolation
+    psVector *range,                   ///< Range (y coords) for interpolation
+    psS32 order,                       ///< Order of interpolation function
+    psScalar *x                        ///< Location at which to evaluate
+);
 
 #if 0
Index: /trunk/psLib/src/math/psSpline.c
===================================================================
--- /trunk/psLib/src/math/psSpline.c	(revision 4404)
+++ /trunk/psLib/src/math/psSpline.c	(revision 4405)
@@ -7,6 +7,6 @@
  *  polynomials.  It also contains a Gaussian functions.
  *
- *  @version $Revision: 1.111 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2005-06-25 02:02:05 $
+ *  @version $Revision: 1.112 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2005-06-28 00:53:53 $
  *
  *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
@@ -1232,24 +1232,24 @@
 }
 
-psF32 psPolynomial1DEval(const psPolynomial1D* myPoly, psF32 x)
-{
-    PS_ASSERT_POLY_NON_NULL(myPoly, NAN);
-
-    if (myPoly->type == PS_POLYNOMIAL_ORD) {
-        return(ordPolynomial1DEval(x, myPoly));
-    } else if (myPoly->type == PS_POLYNOMIAL_CHEB) {
-        return(chebPolynomial1DEval(x, myPoly));
+psF64 psPolynomial1DEval(const psPolynomial1D* poly, psF64 x)
+{
+    PS_ASSERT_POLY_NON_NULL(poly, NAN);
+
+    if (poly->type == PS_POLYNOMIAL_ORD) {
+        return(ordPolynomial1DEval(x, poly));
+    } else if (poly->type == PS_POLYNOMIAL_CHEB) {
+        return(chebPolynomial1DEval(x, poly));
     } else {
         psError(PS_ERR_BAD_PARAMETER_TYPE, true,
                 PS_ERRORTEXT_psFunctions_INVALID_POLYNOMIAL_TYPE,
-                myPoly->type);
+                poly->type);
     }
     return(NAN);
 }
 
-psVector *psPolynomial1DEvalVector(const psPolynomial1D *myPoly,
+psVector *psPolynomial1DEvalVector(const psPolynomial1D *poly,
                                    const psVector *x)
 {
-    PS_ASSERT_POLY_NON_NULL(myPoly, NULL);
+    PS_ASSERT_POLY_NON_NULL(poly, NULL);
     PS_ASSERT_VECTOR_NON_NULL(x, NULL);
     PS_ASSERT_VECTOR_TYPE(x, PS_TYPE_F32, NULL);
@@ -1259,5 +1259,5 @@
     tmp = psVectorAlloc(x->n, PS_TYPE_F32);
     for (psS32 i=0;i<x->n;i++) {
-        tmp->data.F32[i] = psPolynomial1DEval(myPoly, x->data.F32[i]);
+        tmp->data.F32[i] = psPolynomial1DEval(poly, x->data.F32[i]);
     }
 
@@ -1265,26 +1265,26 @@
 }
 
-psF32 psPolynomial2DEval(const psPolynomial2D* myPoly, psF32 x, psF32 y)
-{
-    PS_ASSERT_POLY_NON_NULL(myPoly, NAN);
-
-    if (myPoly->type == PS_POLYNOMIAL_ORD) {
-        return(ordPolynomial2DEval(x, y, myPoly));
-    } else if (myPoly->type == PS_POLYNOMIAL_CHEB) {
-        return(chebPolynomial2DEval(x, y, myPoly));
+psF64 psPolynomial2DEval(const psPolynomial2D* poly, psF64 x, psF64 y)
+{
+    PS_ASSERT_POLY_NON_NULL(poly, NAN);
+
+    if (poly->type == PS_POLYNOMIAL_ORD) {
+        return(ordPolynomial2DEval(x, y, poly));
+    } else if (poly->type == PS_POLYNOMIAL_CHEB) {
+        return(chebPolynomial2DEval(x, y, poly));
     } else {
         psError(PS_ERR_BAD_PARAMETER_TYPE, true,
                 PS_ERRORTEXT_psFunctions_INVALID_POLYNOMIAL_TYPE,
-                myPoly->type);
+                poly->type);
     }
     return(NAN);
 }
 
-psVector *psPolynomial2DEvalVector(const psPolynomial2D *myPoly,
+psVector *psPolynomial2DEvalVector(const psPolynomial2D *poly,
                                    const psVector *x,
                                    const psVector *y)
 
 {
-    PS_ASSERT_POLY_NON_NULL(myPoly, NULL);
+    PS_ASSERT_POLY_NON_NULL(poly, NULL);
     PS_ASSERT_VECTOR_NON_NULL(x, NULL);
     PS_ASSERT_VECTOR_TYPE(x, PS_TYPE_F32, NULL);
@@ -1305,5 +1305,5 @@
     // Evaluate the polynomial at the specified points
     for (psS32 i=0; i<vecLen; i++) {
-        tmp->data.F32[i] = psPolynomial2DEval(myPoly,x->data.F32[i],y->data.F32[i]);
+        tmp->data.F32[i] = psPolynomial2DEval(poly,x->data.F32[i],y->data.F32[i]);
     }
 
@@ -1312,21 +1312,21 @@
 }
 
-psF32 psPolynomial3DEval(const psPolynomial3D* myPoly, psF32 x, psF32 y, psF32 z)
-{
-    PS_ASSERT_POLY_NON_NULL(myPoly, NAN);
-
-    if (myPoly->type == PS_POLYNOMIAL_ORD) {
-        return(ordPolynomial3DEval(x, y, z, myPoly));
-    } else if (myPoly->type == PS_POLYNOMIAL_CHEB) {
-        return(chebPolynomial3DEval(x, y, z, myPoly));
+psF64 psPolynomial3DEval(const psPolynomial3D* poly, psF64 x, psF64 y, psF64 z)
+{
+    PS_ASSERT_POLY_NON_NULL(poly, NAN);
+
+    if (poly->type == PS_POLYNOMIAL_ORD) {
+        return(ordPolynomial3DEval(x, y, z, poly));
+    } else if (poly->type == PS_POLYNOMIAL_CHEB) {
+        return(chebPolynomial3DEval(x, y, z, poly));
     } else {
         psError(PS_ERR_BAD_PARAMETER_TYPE, true,
                 PS_ERRORTEXT_psFunctions_INVALID_POLYNOMIAL_TYPE,
-                myPoly->type);
+                poly->type);
     }
     return(NAN);
 }
 
-psVector *psPolynomial3DEvalVector(const psPolynomial3D *myPoly,
+psVector *psPolynomial3DEvalVector(const psPolynomial3D *poly,
                                    const psVector *x,
                                    const psVector *y,
@@ -1334,5 +1334,5 @@
 
 {
-    PS_ASSERT_POLY_NON_NULL(myPoly, NULL);
+    PS_ASSERT_POLY_NON_NULL(poly, NULL);
     PS_ASSERT_VECTOR_NON_NULL(x, NULL);
     PS_ASSERT_VECTOR_TYPE(x, PS_TYPE_F32, NULL);
@@ -1358,5 +1358,5 @@
     // Evaluate polynomial
     for (psS32 i = 0; i < vecLen; i++) {
-        tmp->data.F32[i] = psPolynomial3DEval(myPoly,
+        tmp->data.F32[i] = psPolynomial3DEval(poly,
                                               x->data.F32[i],
                                               y->data.F32[i],
@@ -1368,29 +1368,27 @@
 }
 
-psF32 psPolynomial4DEval(const psPolynomial4D* myPoly, psF32 w, psF32 x, psF32 y, psF32 z)
-{
-    PS_ASSERT_POLY_NON_NULL(myPoly, NAN);
-
-    if (myPoly->type == PS_POLYNOMIAL_ORD) {
-        return(ordPolynomial4DEval(w,x,y,z, myPoly));
-    } else if (myPoly->type == PS_POLYNOMIAL_CHEB) {
-        return(chebPolynomial4DEval(w,x,y,z, myPoly));
+psF64 psPolynomial4DEval(const psPolynomial4D* poly, psF64 x, psF64 y, psF64 z, psF64 t)
+{
+    PS_ASSERT_POLY_NON_NULL(poly, NAN);
+
+    if (poly->type == PS_POLYNOMIAL_ORD) {
+        return(ordPolynomial4DEval(x,y,z,t, poly));
+    } else if (poly->type == PS_POLYNOMIAL_CHEB) {
+        return(chebPolynomial4DEval(x,y,z,t, poly));
     } else {
         psError(PS_ERR_BAD_PARAMETER_TYPE, true,
                 PS_ERRORTEXT_psFunctions_INVALID_POLYNOMIAL_TYPE,
-                myPoly->type);
+                poly->type);
     }
     return(NAN);
 }
 
-psVector *psPolynomial4DEvalVector(const psPolynomial4D *myPoly,
-                                   const psVector *w,
+psVector *psPolynomial4DEvalVector(const psPolynomial4D *poly,
                                    const psVector *x,
                                    const psVector *y,
-                                   const psVector *z)
-{
-    PS_ASSERT_POLY_NON_NULL(myPoly, NULL);
-    PS_ASSERT_VECTOR_NON_NULL(w, NULL);
-    PS_ASSERT_VECTOR_TYPE(w, PS_TYPE_F32, NULL);
+                                   const psVector *z,
+                                   const psVector *t)
+{
+    PS_ASSERT_POLY_NON_NULL(poly, NULL);
     PS_ASSERT_VECTOR_NON_NULL(x, NULL);
     PS_ASSERT_VECTOR_TYPE(x, PS_TYPE_F32, NULL);
@@ -1399,17 +1397,19 @@
     PS_ASSERT_VECTOR_NON_NULL(z, NULL);
     PS_ASSERT_VECTOR_TYPE(z, PS_TYPE_F32, NULL);
+    PS_ASSERT_VECTOR_NON_NULL(t, NULL);
+    PS_ASSERT_VECTOR_TYPE(t, PS_TYPE_F32, NULL);
 
     psVector *tmp;
-    psS32 vecLen=w->n;
+    psS32 vecLen=x->n;
 
     // Determine output vector size from min of input vectors
+    if (z->n < vecLen) {
+        vecLen = z->n;
+    }
     if (y->n < vecLen) {
         vecLen = y->n;
     }
-    if (x->n < vecLen) {
-        vecLen = x->n;
-    }
-    if (z->n < vecLen) {
-        vecLen = z->n;
+    if (t->n < vecLen) {
+        vecLen = t->n;
     }
 
@@ -1419,9 +1419,9 @@
     // Evaluate polynomial
     for (psS32 i = 0; i < vecLen; i++) {
-        tmp->data.F32[i] = psPolynomial4DEval(myPoly,
-                                              w->data.F32[i],
+        tmp->data.F32[i] = psPolynomial4DEval(poly,
                                               x->data.F32[i],
                                               y->data.F32[i],
-                                              z->data.F32[i]);
+                                              z->data.F32[i],
+                                              t->data.F32[i]);
     }
 
Index: /trunk/psLib/src/math/psSpline.h
===================================================================
--- /trunk/psLib/src/math/psSpline.h	(revision 4404)
+++ /trunk/psLib/src/math/psSpline.h	(revision 4405)
@@ -12,6 +12,6 @@
  *  @author GLG, MHPCC
  *
- *  @version $Revision: 1.48 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2005-06-21 03:01:37 $
+ *  @version $Revision: 1.49 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2005-06-28 00:53:53 $
  *
  *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
@@ -67,5 +67,6 @@
     PS_POLYNOMIAL_ORD,                 ///< Ordinary Polynomial
     PS_POLYNOMIAL_CHEB                 ///< Chebyshev Polynomial
-} psPolynomialType;
+}
+psPolynomialType;
 
 /** One-dimensional polynomial */
@@ -73,5 +74,5 @@
 {
     psPolynomialType type;             ///< Polynomial type
-    psS32 n;                             ///< Number of terms
+    psS32 n;                           ///< Number of terms
     psF32 *coeff;                      ///< Coefficients
     psF32 *coeffErr;                   ///< Error in coefficients
@@ -84,6 +85,6 @@
 {
     psPolynomialType type;             ///< Polynomial type
-    psS32 nX;                            ///< Number of terms in x
-    psS32 nY;                            ///< Number of terms in y
+    psS32 nX;                          ///< Number of terms in x
+    psS32 nY;                          ///< Number of terms in y
     psF32 **coeff;                     ///< Coefficients
     psF32 **coeffErr;                  ///< Error in coefficients
@@ -96,7 +97,7 @@
 {
     psPolynomialType type;             ///< Polynomial type
-    psS32 nX;                            ///< Number of terms in x
-    psS32 nY;                            ///< Number of terms in y
-    psS32 nZ;                            ///< Number of terms in z
+    psS32 nX;                          ///< Number of terms in x
+    psS32 nY;                          ///< Number of terms in y
+    psS32 nZ;                          ///< Number of terms in z
     psF32 ***coeff;                    ///< Coefficients
     psF32 ***coeffErr;                 ///< Error in coefficients
@@ -109,8 +110,8 @@
 {
     psPolynomialType type;             ///< Polynomial type
-    psS32 nW;                            ///< Number of terms in w
-    psS32 nX;                            ///< Number of terms in x
-    psS32 nY;                            ///< Number of terms in y
-    psS32 nZ;                            ///< Number of terms in z
+    psS32 nW;                          ///< Number of terms in w
+    psS32 nX;                          ///< Number of terms in x
+    psS32 nY;                          ///< Number of terms in y
+    psS32 nZ;                          ///< Number of terms in z
     psF32 ****coeff;                   ///< Coefficients
     psF32 ****coeffErr;                ///< Error in coefficients
@@ -125,5 +126,5 @@
  */
 psPolynomial1D* psPolynomial1DAlloc(
-    psS32 n,                            ///< Number of terms
+    psS32 n,                           ///< Number of terms
     psPolynomialType type              ///< Polynomial Type
 );
@@ -134,6 +135,6 @@
  */
 psPolynomial2D* psPolynomial2DAlloc(
-    psS32 nX,                           ///< Number of terms in x
-    psS32 nY,                           ///< Number of terms in y
+    psS32 nX,                          ///< Number of terms in x
+    psS32 nY,                          ///< Number of terms in y
     psPolynomialType type              ///< Polynomial Type
 );
@@ -144,7 +145,7 @@
  */
 psPolynomial3D* psPolynomial3DAlloc(
-    psS32 nX,                           ///< Number of terms in x
-    psS32 nY,                           ///< Number of terms in y
-    psS32 nZ,                           ///< Number of terms in z
+    psS32 nX,                          ///< Number of terms in x
+    psS32 nY,                          ///< Number of terms in y
+    psS32 nZ,                          ///< Number of terms in z
     psPolynomialType type              ///< Polynomial Type
 );
@@ -155,8 +156,8 @@
  */
 psPolynomial4D* psPolynomial4DAlloc(
-    psS32 nW,                           ///< Number of terms in w
-    psS32 nX,                           ///< Number of terms in x
-    psS32 nY,                           ///< Number of terms in y
-    psS32 nZ,                           ///< Number of terms in z
+    psS32 nW,                          ///< Number of terms in w
+    psS32 nX,                          ///< Number of terms in x
+    psS32 nY,                          ///< Number of terms in y
+    psS32 nZ,                          ///< Number of terms in z
     psPolynomialType type              ///< Polynomial Type
 );
@@ -164,42 +165,42 @@
 /** Evaluates a 1-D polynomial at specific coordinates.
  *
- *  @return psF32    result of polynomial at given location
- */
-psF32 psPolynomial1DEval(
-    const psPolynomial1D* myPoly,      ///< Coefficients for the polynomial
-    psF32 x                            ///< location at which to evaluate
+ *  @return psF64    result of polynomial at given location
+ */
+psF64 psPolynomial1DEval(
+    const psPolynomial1D* poly,        ///< Coefficients for the polynomial
+    psF64 x                            ///< location at which to evaluate
 );
 
 /** Evaluates a 2-D polynomial at specific coordinates.
  *
- *  @return psF32    result of polynomial at given location
- */
-psF32 psPolynomial2DEval(
-    const psPolynomial2D* myPoly,      ///< Coefficients for the polynomial
-    psF32 x,                            ///< x location at which to evaluate
-    psF32 y                             ///< y location at which to evaluate
+ *  @return psF64    result of polynomial at given location
+ */
+psF64 psPolynomial2DEval(
+    const psPolynomial2D* poly,         ///< Coefficients for the polynomial
+    psF64 x,                            ///< x location at which to evaluate
+    psF64 y                             ///< y location at which to evaluate
 );
 
 /** Evaluates a 3-D polynomial at specific coordinates.
  *
- *  @return psF32    result of polynomial at given location
- */
-psF32 psPolynomial3DEval(
-    const psPolynomial3D* myPoly,      ///< Coefficients for the polynomial
-    psF32 x,                            ///< x location at which to evaluate
-    psF32 y,                            ///< y location at which to evaluate
-    psF32 z                             ///< z location at which to evaluate
+ *  @return psF64    result of polynomial at given location
+ */
+psF64 psPolynomial3DEval(
+    const psPolynomial3D* poly,        ///< Coefficients for the polynomial
+    psF64 x,                           ///< x location at which to evaluate
+    psF64 y,                           ///< y location at which to evaluate
+    psF64 z                            ///< z location at which to evaluate
 );
 
 /** Evaluates a 4-D polynomial at specific coordinates.
  *
- *  @return psF32    result of polynomial at given location
- */
-psF32 psPolynomial4DEval(
-    const psPolynomial4D* myPoly,      ///< Coefficients for the polynomial
-    psF32 w,                            ///< w location at which to evaluate
-    psF32 x,                            ///< x location at which to evaluate
-    psF32 y,                            ///< y location at which to evaluate
-    psF32 z                             ///< z location at which to evaluate
+ *  @return psF64    result of polynomial at given location
+ */
+psF64 psPolynomial4DEval(
+    const psPolynomial4D* poly,        ///< Coefficients for the polynomial
+    psF64 x,                           ///< x location at which to evaluate
+    psF64 y,                           ///< y location at which to evaluate
+    psF64 z,                           ///< z location at which to evaluate
+    psF64 t                            ///< t location at which to evaluate
 );
 
@@ -209,6 +210,6 @@
  */
 psVector *psPolynomial1DEvalVector(
-    const psPolynomial1D *myPoly,      ///< Coefficients for the polynomial
-    const psVector *x                   ///< x locations at which to evaluate
+    const psPolynomial1D *poly,        ///< Coefficients for the polynomial
+    const psVector *x                  ///< x locations at which to evaluate
 );
 
@@ -218,7 +219,7 @@
  */
 psVector *psPolynomial2DEvalVector(
-    const psPolynomial2D *poly,         ///< Coefficients for the polynomial
-    const psVector *x,                  ///< x locations at which to evaluate
-    const psVector *y                   ///< y locations at which to evaluate
+    const psPolynomial2D *poly,        ///< Coefficients for the polynomial
+    const psVector *x,                 ///< x locations at which to evaluate
+    const psVector *y                  ///< y locations at which to evaluate
 );
 
@@ -228,8 +229,8 @@
  */
 psVector *psPolynomial3DEvalVector(
-    const psPolynomial3D *myPoly,      ///< Coefficients for the polynomial
-    const psVector *x,                  ///< x locations at which to evaluate
-    const psVector *y,                  ///< y locations at which to evaluate
-    const psVector *z                   ///< z locations at which to evaluate
+    const psPolynomial3D *poly,        ///< Coefficients for the polynomial
+    const psVector *x,                 ///< x locations at which to evaluate
+    const psVector *y,                 ///< y locations at which to evaluate
+    const psVector *z                  ///< z locations at which to evaluate
 );
 
@@ -239,9 +240,9 @@
  */
 psVector *psPolynomial4DEvalVector(
-    const psPolynomial4D *myPoly,      ///< Coefficients for the polynomial
-    const psVector *w,                  ///< w locations at which to evaluate
-    const psVector *x,                  ///< x locations at which to evaluate
-    const psVector *y,                  ///< y locations at which to evaluate
-    const psVector *z                   ///< z locations at which to evaluate
+    const psPolynomial4D *poly,        ///< Coefficients for the polynomial
+    const psVector *x,                 ///< x locations at which to evaluate
+    const psVector *y,                 ///< y locations at which to evaluate
+    const psVector *z,                 ///< z locations at which to evaluate
+    const psVector *t                  ///< t locations at which to evaluate
 );
 
@@ -254,5 +255,5 @@
 {
     psPolynomialType type;             ///< Polynomial type
-    psS32 n;                            ///< Number of terms
+    psS32 n;                           ///< Number of terms
     psF64 *coeff;                      ///< Coefficients
     psF64 *coeffErr;                   ///< Error in coefficients
@@ -265,6 +266,6 @@
 {
     psPolynomialType type;             ///< Polynomial type
-    psS32 nX;                           ///< Number of terms in x
-    psS32 nY;                           ///< Number of terms in y
+    psS32 nX;                          ///< Number of terms in x
+    psS32 nY;                          ///< Number of terms in y
     psF64 **coeff;                     ///< Coefficients
     psF64 **coeffErr;                  ///< Error in coefficients
@@ -277,7 +278,7 @@
 {
     psPolynomialType type;             ///< Polynomial type
-    psS32 nX;                           ///< Number of terms in x
-    psS32 nY;                           ///< Number of terms in y
-    psS32 nZ;                           ///< Number of terms in z
+    psS32 nX;                          ///< Number of terms in x
+    psS32 nY;                          ///< Number of terms in y
+    psS32 nZ;                          ///< Number of terms in z
     psF64 ***coeff;                    ///< Coefficients
     psF64 ***coeffErr;                 ///< Error in coefficients
@@ -290,8 +291,8 @@
 {
     psPolynomialType type;             ///< Polynomial type
-    psS32 nW;                           ///< Number of terms in w
-    psS32 nX;                           ///< Number of terms in x
-    psS32 nY;                           ///< Number of terms in y
-    psS32 nZ;                           ///< Number of terms in z
+    psS32 nW;                          ///< Number of terms in w
+    psS32 nX;                          ///< Number of terms in x
+    psS32 nY;                          ///< Number of terms in y
+    psS32 nZ;                          ///< Number of terms in z
     psF64 ****coeff;                   ///< Coefficients
     psF64 ****coeffErr;                ///< Error in coefficients
@@ -305,6 +306,6 @@
  */
 psDPolynomial1D* psDPolynomial1DAlloc(
-    psS32 n,                              ///< Number of terms
-    psPolynomialType type                ///< Polynomial Type
+    psS32 n,                           ///< Number of terms
+    psPolynomialType type              ///< Polynomial Type
 );
 
@@ -314,6 +315,6 @@
  */
 psDPolynomial2D* psDPolynomial2DAlloc(
-    psS32 nX,                           ///< Number of terms in x
-    psS32 nY,                           ///< Number of terms in y
+    psS32 nX,                          ///< Number of terms in x
+    psS32 nY,                          ///< Number of terms in y
     psPolynomialType type              ///< Polynomial Type
 );
@@ -324,7 +325,7 @@
  */
 psDPolynomial3D* psDPolynomial3DAlloc(
-    psS32 nX,                           ///< Number of terms in x
-    psS32 nY,                           ///< Number of terms in y
-    psS32 nZ,                           ///< Number of terms in z
+    psS32 nX,                          ///< Number of terms in x
+    psS32 nY,                          ///< Number of terms in y
+    psS32 nZ,                          ///< Number of terms in z
     psPolynomialType type              ///< Polynomial Type
 );
@@ -335,8 +336,8 @@
  */
 psDPolynomial4D* psDPolynomial4DAlloc(
-    psS32 nW,                           ///< Number of terms in w
-    psS32 nX,                           ///< Number of terms in x
-    psS32 nY,                           ///< Number of terms in y
-    psS32 nZ,                           ///< Number of terms in z
+    psS32 nW,                          ///< Number of terms in w
+    psS32 nX,                          ///< Number of terms in x
+    psS32 nY,                          ///< Number of terms in y
+    psS32 nZ,                          ///< Number of terms in z
     psPolynomialType type              ///< Polynomial Type
 );
@@ -348,5 +349,5 @@
 psF64 psDPolynomial1DEval(
     const psDPolynomial1D* myPoly,     ///< Coefficients for the polynomial
-    psF64 x                             ///< Value at which to evaluate
+    psF64 x                            ///< Value at which to evaluate
 );
 
@@ -357,29 +358,29 @@
 psF64 psDPolynomial2DEval(
     const psDPolynomial2D* myPoly,      ///< Coefficients for the polynomial
-    psF64 x,                             ///< Value x at which to evaluate
-    psF64 y                              ///< Value y at which to evaluate
+    psF64 x,                            ///< Value x at which to evaluate
+    psF64 y                             ///< Value y at which to evaluate
 );
 
 /** Evaluates a double-precision 3-D polynomial at specific coordinates.
  *
- *  @return psF32    result of polynomial at given location
+ *  @return psF64    result of polynomial at given location
  */
 psF64 psDPolynomial3DEval(
     const psDPolynomial3D* myPoly,     ///< Coefficients for the polynomial
-    psF64 x,                            ///< Value x at which to evaluate
-    psF64 y,                            ///< Value y at which to evaluate
-    psF64 z                             ///< Value z at which to evaluate
+    psF64 x,                           ///< Value x at which to evaluate
+    psF64 y,                           ///< Value y at which to evaluate
+    psF64 z                            ///< Value z at which to evaluate
 );
 
 /** Evaluates a double-precision 4-D polynomial at specific coordinates.
  *
- *  @return psF32    result of polynomial at given location
+ *  @return psF64    result of polynomial at given location
  */
 psF64 psDPolynomial4DEval(
     const psDPolynomial4D* myPoly,     ///< Coefficients for the polynomial
-    psF64 w,                            ///< Value w at which to evaluate
-    psF64 x,                            ///< Value x at which to evaluate
-    psF64 y,                            ///< Value y at which to evaluate
-    psF64 z                             ///< Value z at which to evaluate
+    psF64 w,                           ///< Value w at which to evaluate
+    psF64 x,                           ///< Value x at which to evaluate
+    psF64 y,                           ///< Value y at which to evaluate
+    psF64 z                            ///< Value z at which to evaluate
 );
 
@@ -390,5 +391,5 @@
 psVector *psDPolynomial1DEvalVector(
     const psDPolynomial1D *myPoly,     ///< Coefficients for the polynomial
-    const psVector *x                   ///< x locations at which to evaluate
+    const psVector *x                  ///< x locations at which to evaluate
 );
 
@@ -399,6 +400,6 @@
 psVector *psDPolynomial2DEvalVector(
     const psDPolynomial2D *myPoly,     ///< Coefficients for the polynomial
-    const psVector *x,                  ///< x locations at which to evaluate
-    const psVector *y                   ///< y locations at which to evaluate
+    const psVector *x,                 ///< x locations at which to evaluate
+    const psVector *y                  ///< y locations at which to evaluate
 );
 
@@ -409,7 +410,7 @@
 psVector *psDPolynomial3DEvalVector(
     const psDPolynomial3D *myPoly,     ///< Coefficients for the polynomial
-    const psVector *x,                  ///< x locations at which to evaluate
-    const psVector *y,                  ///< y locations at which to evaluate
-    const psVector *z                   ///< z locations at which to evaluate
+    const psVector *x,                 ///< x locations at which to evaluate
+    const psVector *y,                 ///< y locations at which to evaluate
+    const psVector *z                  ///< z locations at which to evaluate
 );
 
@@ -420,8 +421,8 @@
 psVector *psDPolynomial4DEvalVector(
     const psDPolynomial4D *myPoly,     ///< Coefficients for the polynomial
-    const psVector *w,                  ///< w locations at which to evaluate
-    const psVector *x,                  ///< x locations at which to evaluate
-    const psVector *y,                  ///< y locations at which to evaluate
-    const psVector *z                   ///< z locations at which to evaluate
+    const psVector *w,                 ///< w locations at which to evaluate
+    const psVector *x,                 ///< x locations at which to evaluate
+    const psVector *y,                 ///< y locations at which to evaluate
+    const psVector *z                  ///< z locations at which to evaluate
 );
 
@@ -429,5 +430,5 @@
 typedef struct
 {
-    psS32 n;                            ///< The number of spline polynomials
+    psS32 n;                           ///< The number of spline polynomials
     psPolynomial1D **spline;           ///< An array of n pointers to the spline polynomials
     psF32 *p_psDeriv2;                 ///< For cubic splines, the second derivative at each domain point.  Size is n+1.
@@ -444,8 +445,10 @@
  *  @return psSpline1D*    new 1-D spline struct
  */
-psSpline1D *psSpline1DAlloc(int n,               ///< Number of spline polynomials
-                            int order,           ///< Order of spline polynomials
-                            float min,           ///< Lower boundary value of spline polynomials
-                            float max);          ///< Upper boundary value of spline polynomials
+psSpline1D *psSpline1DAlloc(
+    int n,                             ///< Number of spline polynomials
+    int order,                         ///< Order of spline polynomials
+    float min,                         ///< Lower boundary value of spline polynomials
+    float max                          ///< Upper boundary value of spline polynomials
+);
 
 /** Allocates a psSpline1D structure
@@ -455,6 +458,8 @@
  *  @return psSpline1D*    new 1-D spline struct
  */
-psSpline1D *psSpline1DAllocGeneric(const psVector *bounds,   ///< Bounds for spline polynomials
-                                   int order);               ///< Order of spline polynomials
+psSpline1D *psSpline1DAllocGeneric(
+    const psVector *bounds,            ///< Bounds for spline polynomials
+    int order                          ///< Order of spline polynomials
+);
 
 /** Evaluates 1-D spline polynomials at a specific coordinate.
@@ -481,6 +486,8 @@
  *  @return psS32    corresponding index number of specified value
  */
-psS32 p_psVectorBinDisect(psVector *bins,        ///< Array of non-decreasing values
-                          psScalar *x);          ///< Target value to find
+psS32 p_psVectorBinDisect(
+    psVector *bins,                    ///< Array of non-decreasing values
+    psScalar *x                        ///< Target value to find
+);
 
 /** Interpolates a series of data points for evaluation at a specific coordinate.  Uses a
@@ -489,8 +496,10 @@
  *  @return psScalar*    Lagrange interpolation value at given location
  */
-psScalar *p_psVectorInterpolate(psVector *domain,     ///< Domain (x coords) for interpolation
-                                psVector *range,      ///< Range (y coords) for interpolation
-                                psS32 order,          ///< Order of interpolation function
-                                psScalar *x);         ///< Location at which to evaluate
+psScalar *p_psVectorInterpolate(
+    psVector *domain,                  ///< Domain (x coords) for interpolation
+    psVector *range,                   ///< Range (y coords) for interpolation
+    psS32 order,                       ///< Order of interpolation function
+    psScalar *x                        ///< Location at which to evaluate
+);
 
 #if 0
Index: /trunk/psLib/test/dataManip/verified/tst_psFunc08.stderr
===================================================================
--- /trunk/psLib/test/dataManip/verified/tst_psFunc08.stderr	(revision 4404)
+++ /trunk/psLib/test/dataManip/verified/tst_psFunc08.stderr	(revision 4405)
@@ -34,5 +34,5 @@
     Following should generate an error message for NULL polynomial
 <DATE><TIME>|<HOST>|E|psPolynomial1DEvalVector (FILE:LINENO)
-    Unallowable operation: polynomial myPoly or its coeffs is NULL.
+    Unallowable operation: polynomial poly or its coeffs is NULL.
 <DATE><TIME>|<HOST>|I|testPoly1DEvalVector
     Following should generate an error message for NULL input vector
Index: /trunk/psLib/test/dataManip/verified/tst_psFunc09.stderr
===================================================================
--- /trunk/psLib/test/dataManip/verified/tst_psFunc09.stderr	(revision 4404)
+++ /trunk/psLib/test/dataManip/verified/tst_psFunc09.stderr	(revision 4405)
@@ -34,5 +34,5 @@
     Following should generate an error message for NULL polynomial
 <DATE><TIME>|<HOST>|E|psPolynomial2DEvalVector (FILE:LINENO)
-    Unallowable operation: polynomial myPoly or its coeffs is NULL.
+    Unallowable operation: polynomial poly or its coeffs is NULL.
 <DATE><TIME>|<HOST>|I|testPoly2DEvalVector
     Following should generate an error message for NULL input vector
Index: /trunk/psLib/test/dataManip/verified/tst_psFunc10.stderr
===================================================================
--- /trunk/psLib/test/dataManip/verified/tst_psFunc10.stderr	(revision 4404)
+++ /trunk/psLib/test/dataManip/verified/tst_psFunc10.stderr	(revision 4405)
@@ -34,5 +34,5 @@
     Following should generate an error message for NULL polynomial
 <DATE><TIME>|<HOST>|E|psPolynomial3DEvalVector (FILE:LINENO)
-    Unallowable operation: polynomial myPoly or its coeffs is NULL.
+    Unallowable operation: polynomial poly or its coeffs is NULL.
 <DATE><TIME>|<HOST>|I|testPoly3DEvalVector
     Following should generate an error message for NULL input vector
Index: /trunk/psLib/test/dataManip/verified/tst_psFunc11.stderr
===================================================================
--- /trunk/psLib/test/dataManip/verified/tst_psFunc11.stderr	(revision 4404)
+++ /trunk/psLib/test/dataManip/verified/tst_psFunc11.stderr	(revision 4405)
@@ -34,9 +34,5 @@
     Following should generate an error message for NULL polynomial
 <DATE><TIME>|<HOST>|E|psPolynomial4DEvalVector (FILE:LINENO)
-    Unallowable operation: polynomial myPoly or its coeffs is NULL.
-<DATE><TIME>|<HOST>|I|testPoly4DEvalVector
-    Following should generate an error message for NULL input vector
-<DATE><TIME>|<HOST>|E|psPolynomial4DEvalVector (FILE:LINENO)
-    Unallowable operation: psVector w or its data is NULL.
+    Unallowable operation: polynomial poly or its coeffs is NULL.
 <DATE><TIME>|<HOST>|I|testPoly4DEvalVector
     Following should generate an error message for NULL input vector
@@ -52,7 +48,7 @@
     Unallowable operation: psVector z or its data is NULL.
 <DATE><TIME>|<HOST>|I|testPoly4DEvalVector
-    Following should generate an error message for invalid input type
+    Following should generate an error message for NULL input vector
 <DATE><TIME>|<HOST>|E|psPolynomial4DEvalVector (FILE:LINENO)
-    Unallowable operation: psVector x has incorrect type.
+    Unallowable operation: psVector t or its data is NULL.
 <DATE><TIME>|<HOST>|I|testPoly4DEvalVector
     Following should generate an error message for invalid input type
@@ -66,5 +62,9 @@
     Following should generate an error message for invalid input type
 <DATE><TIME>|<HOST>|E|psPolynomial4DEvalVector (FILE:LINENO)
-    Unallowable operation: psVector w has incorrect type.
+    Unallowable operation: psVector t has incorrect type.
+<DATE><TIME>|<HOST>|I|testPoly4DEvalVector
+    Following should generate an error message for invalid input type
+<DATE><TIME>|<HOST>|E|psPolynomial4DEvalVector (FILE:LINENO)
+    Unallowable operation: psVector x has incorrect type.
 
 ---> TESTPOINT PASSED (psPolynomialXDEval{psPolynomial4DEvalVector} | tst_psFunc11.c)
