IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Mar 27, 2007, 12:52:03 PM (19 years ago)
Author:
jhoblitt
Message:

s/is_float/is_float/g
s/is_float_tol/is_float_tol/g
s/is_double/is_double/g
s/is_double_tol/is_double_tol/g
s/is_str/is_str/g
s/is_strn/is_strn/g

Location:
trunk/psLib/test/math
Files:
9 edited

Legend:

Unmodified
Added
Removed
  • trunk/psLib/test/math/tap_psPolynomialUtils_Derivatives.c

    r10848 r12607  
    4242        ok(dX->nY == 2, "new y order is %d", dX->nY);
    4343
    44         ok_float(dX->coeff[0][0], +2.0, "x^0 y^0 coeff is %f", dX->coeff[0][0]);
    45         ok_float(dX->coeff[1][0], -6.0, "x^1 y^0 coeff is %f", dX->coeff[1][0]);
    46         ok_float(dX->coeff[0][1], +4.0, "x^0 y^1 coeff is %f", dX->coeff[0][1]);
     44        is_float(dX->coeff[0][0], +2.0, "x^0 y^0 coeff is %f", dX->coeff[0][0]);
     45        is_float(dX->coeff[1][0], -6.0, "x^1 y^0 coeff is %f", dX->coeff[1][0]);
     46        is_float(dX->coeff[0][1], +4.0, "x^0 y^1 coeff is %f", dX->coeff[0][1]);
    4747
    4848        ok(!dX->mask[0][0], "x^0 y^0 coeff is unmasked");
     
    9191        ok(dX->nY == 2, "new y order is %d", dX->nY);
    9292
    93         ok_float(dX->coeff[0][0], +2.0, "x^0 y^0 coeff is %f", dX->coeff[0][0]);
    94         ok_float(dX->coeff[1][0], -6.0, "x^1 y^0 coeff is %f", dX->coeff[1][0]);
    95         ok_float(dX->coeff[0][1], +4.0, "x^0 y^1 coeff is %f", dX->coeff[0][1]);
     93        is_float(dX->coeff[0][0], +2.0, "x^0 y^0 coeff is %f", dX->coeff[0][0]);
     94        is_float(dX->coeff[1][0], -6.0, "x^1 y^0 coeff is %f", dX->coeff[1][0]);
     95        is_float(dX->coeff[0][1], +4.0, "x^0 y^1 coeff is %f", dX->coeff[0][1]);
    9696
    9797        ok(!dX->mask[0][0], "x^0 y^0 coeff is unmasked");
     
    172172        ok(dY->nY == 1, "new y order is %d", dY->nY);
    173173
    174         ok_float(dY->coeff[0][0], +3.0, "x^0 y^0 coeff is %f", dY->coeff[0][0]);
    175         ok_float(dY->coeff[1][0], +4.0, "x^1 y^0 coeff is %f", dY->coeff[1][0]);
    176         ok_float(dY->coeff[0][1], -4.0, "x^0 y^1 coeff is %f", dY->coeff[0][1]);
     174        is_float(dY->coeff[0][0], +3.0, "x^0 y^0 coeff is %f", dY->coeff[0][0]);
     175        is_float(dY->coeff[1][0], +4.0, "x^1 y^0 coeff is %f", dY->coeff[1][0]);
     176        is_float(dY->coeff[0][1], -4.0, "x^0 y^1 coeff is %f", dY->coeff[0][1]);
    177177
    178178        ok(!dY->mask[0][0], "x^0 y^0 coeff is unmasked");
     
    221221        ok(dY->nY == 1, "new y order is %d", dY->nY);
    222222
    223         ok_float(dY->coeff[0][0], +3.0, "x^0 y^0 coeff is %f", dY->coeff[0][0]);
    224         ok_float(dY->coeff[1][0], +4.0, "x^1 y^0 coeff is %f", dY->coeff[1][0]);
    225         ok_float(dY->coeff[0][1], -4.0, "x^0 y^1 coeff is %f", dY->coeff[0][1]);
     223        is_float(dY->coeff[0][0], +3.0, "x^0 y^0 coeff is %f", dY->coeff[0][0]);
     224        is_float(dY->coeff[1][0], +4.0, "x^1 y^0 coeff is %f", dY->coeff[1][0]);
     225        is_float(dY->coeff[0][1], -4.0, "x^0 y^1 coeff is %f", dY->coeff[0][1]);
    226226
    227227        ok(!dY->mask[0][0], "x^0 y^0 coeff is unmasked");
  • trunk/psLib/test/math/tap_psRandom.c

    r10945 r12607  
    3939#define ERROR_TOLERANCE 0.2
    4040#define VERBOSE 0
    41 # define ok_float_tol_per(VALUE,EXPECT,TOL,COMMENT, ...)\
     41# define is_float_tol_per(VALUE,EXPECT,TOL,COMMENT, ...)\
    4242ok((fabs((VALUE)-(EXPECT)) < (TOL)), COMMENT, ## __VA_ARGS__);
    4343
     
    102102
    103103        // Verify mean and stdev
    104         ok_float_tol_per(stats->sampleMean, UNIFORM_MEAN, ERROR_TOLERANCE, "Mean is within expected range");
    105         ok_float_tol_per(stats->sampleStdev, UNIFORM_STDEV, ERROR_TOLERANCE, "StDev is within expected range");
     104        is_float_tol_per(stats->sampleMean, UNIFORM_MEAN, ERROR_TOLERANCE, "Mean is within expected range");
     105        is_float_tol_per(stats->sampleStdev, UNIFORM_STDEV, ERROR_TOLERANCE, "StDev is within expected range");
    106106
    107107        skip_end();
     
    143143
    144144        // Verify mean and stdev
    145         ok_float_tol_per(stats->sampleMean, GAUSSIAN_MEAN, ERROR_TOLERANCE, "Mean is within expected range");
    146         ok_float_tol_per(stats->sampleStdev, GAUSSIAN_STDEV, ERROR_TOLERANCE, "StDev is within expected range");
     145        is_float_tol_per(stats->sampleMean, GAUSSIAN_MEAN, ERROR_TOLERANCE, "Mean is within expected range");
     146        is_float_tol_per(stats->sampleStdev, GAUSSIAN_STDEV, ERROR_TOLERANCE, "StDev is within expected range");
    147147
    148148        skip_end();
     
    185185        stats = psVectorStats(stats, rans, NULL, NULL, 0);
    186186        // Verify mean and stdev
    187         ok_float_tol_per(stats->sampleMean, POISSON_MEAN, ERROR_TOLERANCE, "Mean is within expected range");
    188         ok_float_tol_per(stats->sampleStdev, POISSON_STDEV, ERROR_TOLERANCE, "StDev is within expected range");
     187        is_float_tol_per(stats->sampleMean, POISSON_MEAN, ERROR_TOLERANCE, "Mean is within expected range");
     188        is_float_tol_per(stats->sampleStdev, POISSON_STDEV, ERROR_TOLERANCE, "StDev is within expected range");
    189189
    190190        skip_end();
  • trunk/psLib/test/math/tap_psSparse.c

    r12513 r12607  
    7474        dS2 = sqrt (dS2/100.0 - dS*dS);
    7575
    76         ok_float_tol (dS2, 0.0, 1e-4, "scatter: %.20f", dS2);
     76        is_float_tol (dS2, 0.0, 1e-4, "scatter: %.20f", dS2);
    7777
    7878        psFree (matrix);
     
    147147        dS2 = sqrt (dS2/100.0 - dS*dS);
    148148
    149         ok_float_tol (dS2, 0.0, 1e-4, "scatter: %.20f", dS2);
     149        is_float_tol (dS2, 0.0, 1e-4, "scatter: %.20f", dS2);
    150150
    151151        psFree (matrix);
     
    219219        // test the support functions: LowerProduct
    220220        fVec = psSparseBorderLowerProduct (NULL, border, xRef);
    221         ok_float (fVec->n, 1.0, "f dimen: %d", fVec->n);
    222         ok_float (fVec->data.F32[0], 0.3, "f(0): %f", fVec->data.F32[0]);
     221        is_float (fVec->n, 1.0, "f dimen: %d", fVec->n);
     222        is_float (fVec->data.F32[0], 0.3, "f(0): %f", fVec->data.F32[0]);
    223223        psFree (fVec);
    224224
    225225        // test the support functions: Upper Product
    226226        fVec = psSparseBorderUpperProduct (NULL, border, yRef);
    227         ok_float (fVec->n, 2.0, "f dimen: %d", fVec->n);
    228         ok_float (fVec->data.F32[0], 0.05, "f(0): %f", fVec->data.F32[0]);
    229         ok_float (fVec->data.F32[1], 0.10, "f(0): %f", fVec->data.F32[1]);
     227        is_float (fVec->n, 2.0, "f dimen: %d", fVec->n);
     228        is_float (fVec->data.F32[0], 0.05, "f(0): %f", fVec->data.F32[0]);
     229        is_float (fVec->data.F32[1], 0.10, "f(0): %f", fVec->data.F32[1]);
    230230        psFree (fVec);
    231231
    232232        // test the support functions: Square Product
    233233        fVec = psSparseBorderSquareProduct (NULL, border, yRef);
    234         ok_float (fVec->n, 1.0, "f dimen: %d", fVec->n);
    235         ok_float (fVec->data.F32[0], 0.25, "f(0): %f", fVec->data.F32[0]);
     234        is_float (fVec->n, 1.0, "f dimen: %d", fVec->n);
     235        is_float (fVec->data.F32[0], 0.25, "f(0): %f", fVec->data.F32[0]);
    236236        psFree (fVec);
    237237
     
    239239        psVector *gVec = NULL;
    240240        psSparseBorderMultiply (&fVec, &gVec, border, xRef, yRef);
    241         ok_float (fVec->data.F32[0], 1.15, "f(0): %f", fVec->data.F32[0]);
    242         ok_float (fVec->data.F32[1], 1.20, "f(1): %f", fVec->data.F32[1]);
    243         ok_float (gVec->data.F32[0], 0.55, "g(0): %f", gVec->data.F32[0]);
     241        is_float (fVec->data.F32[0], 1.15, "f(0): %f", fVec->data.F32[0]);
     242        is_float (fVec->data.F32[1], 1.20, "f(1): %f", fVec->data.F32[1]);
     243        is_float (gVec->data.F32[0], 0.55, "g(0): %f", gVec->data.F32[0]);
    244244
    245245        // supply the fVec and gVec data to the border
     
    263263        psVector *yFit = NULL;
    264264        psSparseBorderSolve (&xFit, &yFit, constraint, border, 4);
    265         ok_float_tol (xFit->data.F32[0], 1.0, 1e-4, "f(0): %f", xFit->data.F32[0]);
    266         ok_float_tol (xFit->data.F32[1], 1.0, 1e-4, "f(1): %f", xFit->data.F32[1]);
    267         ok_float_tol (yFit->data.F32[0], 0.5, 1e-4, "g(0): %f", yFit->data.F32[0]);
     265        is_float_tol (xFit->data.F32[0], 1.0, 1e-4, "f(0): %f", xFit->data.F32[0]);
     266        is_float_tol (xFit->data.F32[1], 1.0, 1e-4, "f(1): %f", xFit->data.F32[1]);
     267        is_float_tol (yFit->data.F32[0], 0.5, 1e-4, "g(0): %f", yFit->data.F32[0]);
    268268
    269269        psFree (xFit);
     
    321321            }
    322322        }
    323         ok_float(border->Bij->data.F32[0][0], 0.1, "set matrix element %d,%d", 0, 0);
     323        is_float(border->Bij->data.F32[0][0], 0.1, "set matrix element %d,%d", 0, 0);
    324324
    325325        // construct the Q component:
     
    381381        dS /= Nrows;
    382382        dS2 = sqrt (dS2/Nrows - dS*dS);
    383         ok_float_tol (dS2, 0.0, 1e-4, "scatter: %.20f", dS2);
     383        is_float_tol (dS2, 0.0, 1e-4, "scatter: %.20f", dS2);
    384384
    385385        // measure stdev between yFit and yRef
    386386        float dY = yRef->data.F32[0] - yFit->data.F32[0];
    387387        // fprintf (stderr, "%5.3f %5.3f %5.3f %5.3f\n", gVec->data.F32[0], yRef->data.F32[0], yFit->data.F32[0], dS);
    388         ok_float_tol (dY, 0.0, 2e-4, "scatter: %.20f", dY);
     388        is_float_tol (dY, 0.0, 2e-4, "scatter: %.20f", dY);
    389389
    390390        psFree (xRef);
  • trunk/psLib/test/math/tap_psStats00.c

    r12242 r12607  
    99 *  @author GLG, MHPCC
    1010 *
    11  *  @version $Revision: 1.4 $ $Name: not supported by cvs2svn $
    12  *  @date $Date: 2007-03-05 23:23:38 $
     11 *  @version $Revision: 1.5 $ $Name: not supported by cvs2svn $
     12 *  @date $Date: 2007-03-27 22:52:03 $
    1313 *
    1414 *  Copyright 2004-2005 Maui High Performance Computing Center, Univ. of Hawaii
     
    120120        ok(result, "psVectorStats suceeded (F32: no mask vector, no error vector)");
    121121        ok(!isnan(myStats->sampleMean), "psVectorStats() returned non-NAN");
    122         ok_float_tol(myStats->sampleMean, expectedMeanNoMaskF32, 1e-4,
     122        is_float_tol(myStats->sampleMean, expectedMeanNoMaskF32, 1e-4,
    123123                     "The mean was %f, should be %f", myStats->sampleMean, expectedMeanNoMaskF32);
    124124        ok(!psMemCheckLeaks (id, NULL, NULL, false), "no memory leaks");
     
    131131        ok(result, "psVectorStats suceeded (F32: no mask vector, with error vector)");
    132132        ok(!isnan(myStats->sampleMean), "psVectorStats() returned non-NAN");
    133         ok_float_tol(myStats->sampleMean, expectedWeightMeanNoMaskF32, 1e-4, "The mean was %f, should be %f", myStats->sampleMean, expectedWeightMeanNoMaskF32);
     133        is_float_tol(myStats->sampleMean, expectedWeightMeanNoMaskF32, 1e-4, "The mean was %f, should be %f", myStats->sampleMean, expectedWeightMeanNoMaskF32);
    134134        ok(!psMemCheckLeaks (id, NULL, NULL, false), "no memory leaks");
    135135    }
     
    144144        ok(result, "psVectorStats suceeded (F32, no mask, no errors, with data range)");
    145145        ok(!isnan(myStats->sampleMean), "psVectorStats() returned non-NAN");
    146         ok_float_tol(myStats->sampleMean, expectedMeanRangeNoMaskF32, 1e-4, "The mean was %f, should be %f", myStats->sampleMean, expectedMeanRangeNoMaskF32);
     146        is_float_tol(myStats->sampleMean, expectedMeanRangeNoMaskF32, 1e-4, "The mean was %f, should be %f", myStats->sampleMean, expectedMeanRangeNoMaskF32);
    147147        ok(!psMemCheckLeaks (id, NULL, NULL, false), "no memory leaks");
    148148    }
     
    156156        ok(result, "psVectorStats suceeded (F32, no mask, with errors and data range)");
    157157        ok(!isnan(myStats->sampleMean), "psVectorStats() returned non-NAN");
    158         ok_float_tol(myStats->sampleMean, expectedWeightMeanNoMaskRangeF32, 1e-4, "The mean was %f, should be %f", myStats->sampleMean, expectedWeightMeanNoMaskRangeF32);
     158        is_float_tol(myStats->sampleMean, expectedWeightMeanNoMaskRangeF32, 1e-4, "The mean was %f, should be %f", myStats->sampleMean, expectedWeightMeanNoMaskRangeF32);
    159159        ok(!psMemCheckLeaks (id, NULL, NULL, false), "no memory leaks");
    160160    }
     
    167167        ok(result, "psVectorStats suceeded (F32, with mask, no errors)");
    168168        ok(!isnan(myStats->sampleMean), "psVectorStats() returned non-NAN");
    169         ok_float_tol(myStats->sampleMean, expectedMeanWithMaskF32, 1e-4, "The mean was %f, should be %f", myStats->sampleMean, expectedMeanWithMaskF32);
     169        is_float_tol(myStats->sampleMean, expectedMeanWithMaskF32, 1e-4, "The mean was %f, should be %f", myStats->sampleMean, expectedMeanWithMaskF32);
    170170        ok(!psMemCheckLeaks (id, NULL, NULL, false), "no memory leaks");
    171171    }
     
    177177        ok(result, "psVectorStats suceeded (F32, with mask and errors)");
    178178        ok(!isnan(myStats->sampleMean), "psVectorStats() returned non-NAN");
    179         ok_float_tol(myStats->sampleMean, expectedWeightMeanWithMaskF32, 1e-4, "The mean was %f, should be %f", myStats->sampleMean, expectedWeightMeanWithMaskF32);
     179        is_float_tol(myStats->sampleMean, expectedWeightMeanWithMaskF32, 1e-4, "The mean was %f, should be %f", myStats->sampleMean, expectedWeightMeanWithMaskF32);
    180180        ok(!psMemCheckLeaks (id, NULL, NULL, false), "no memory leaks");
    181181    }
     
    188188        ok(result, "psVectorStats suceeded (F32, with mask and data range)");
    189189        ok(!isnan(myStats->sampleMean), "psVectorStats() returned non-NAN");
    190         ok_float_tol(myStats->sampleMean, expectedMeanRangeWithMaskF32, 1e-4, "The mean was %f, should be %f", myStats->sampleMean, expectedMeanRangeWithMaskF32);
     190        is_float_tol(myStats->sampleMean, expectedMeanRangeWithMaskF32, 1e-4, "The mean was %f, should be %f", myStats->sampleMean, expectedMeanRangeWithMaskF32);
    191191        ok(!psMemCheckLeaks (id, NULL, NULL, false), "no memory leaks");
    192192    }
     
    198198        ok(result, "psVectorStats suceeded (F32, withmask, errors, and data range)");
    199199        ok(!isnan(myStats->sampleMean), "psVectorStats() returned non-NAN");
    200         ok_float_tol(myStats->sampleMean, expectedWeightMeanWithMaskRangeF32, 1e-4, "The mean was %f, should be %f", myStats->sampleMean, expectedWeightMeanWithMaskRangeF32);
     200        is_float_tol(myStats->sampleMean, expectedWeightMeanWithMaskRangeF32, 1e-4, "The mean was %f, should be %f", myStats->sampleMean, expectedWeightMeanWithMaskRangeF32);
    201201        ok(!psMemCheckLeaks (id, NULL, NULL, false), "no memory leaks");
    202202    }
     
    214214        ok(result, "psVectorStats suceeded (F32, with mask = 2, no errors)");
    215215        ok(!isnan(myStats->sampleMean), "psVectorStats() returned non-NAN");
    216         ok_float_tol(myStats->sampleMean, expectedMeanWithMaskF32, 1e-4, "The mean was %f, should be %f", myStats->sampleMean, expectedMeanWithMaskF32);
     216        is_float_tol(myStats->sampleMean, expectedMeanWithMaskF32, 1e-4, "The mean was %f, should be %f", myStats->sampleMean, expectedMeanWithMaskF32);
    217217        ok(!psMemCheckLeaks (id, NULL, NULL, false), "no memory leaks");
    218218    }
     
    230230        ok(result, "psVectorStats suceeded (F32, with mask = 3, no errors)");
    231231        ok(!isnan(myStats->sampleMean), "psVectorStats() returned non-NAN");
    232         ok_float_tol(myStats->sampleMean, expectedMeanNoMaskF32, 1e-4, "The mean was %f, should be %f", myStats->sampleMean, expectedMeanNoMaskF32);
     232        is_float_tol(myStats->sampleMean, expectedMeanNoMaskF32, 1e-4, "The mean was %f, should be %f", myStats->sampleMean, expectedMeanNoMaskF32);
    233233        ok(!psMemCheckLeaks (id, NULL, NULL, false), "no memory leaks");
    234234    }
     
    276276        ok(result, "psVectorStats suceeded (S8, no mask, no errors)");
    277277        ok(!isnan(myStats->sampleMean), "psVectorStats() returned non-NAN");
    278         ok_float_tol(myStats->sampleMean, expectedMeanNoMaskS8, 1e-4, "The mean was %f, should be %f", myStats->sampleMean, expectedMeanNoMaskS8);
     278        is_float_tol(myStats->sampleMean, expectedMeanNoMaskS8, 1e-4, "The mean was %f, should be %f", myStats->sampleMean, expectedMeanNoMaskS8);
    279279        psFree(myStats);
    280280        psFree(myVector);
     
    297297        ok(result, "psVectorStats suceeded (U16, no mask, no errors)");
    298298        ok(!isnan(myStats->sampleMean), "psVectorStats() returned non-NAN");
    299         ok_float_tol(myStats->sampleMean, expectedMeanNoMaskU16, 1e-4, "The mean was %f, should be %f", myStats->sampleMean, expectedMeanNoMaskU16);
     299        is_float_tol(myStats->sampleMean, expectedMeanNoMaskU16, 1e-4, "The mean was %f, should be %f", myStats->sampleMean, expectedMeanNoMaskU16);
    300300        psFree(myStats);
    301301        psFree(myVector);
     
    317317        ok(result, "psVectorStats suceeded (F64, no mask, no errors)");
    318318        ok(!isnan(myStats->sampleMean), "psVectorStats() returned non-NAN");
    319         ok_float_tol(myStats->sampleMean, expectedMeanNoMaskF64, 1e-4, "The mean was %f, should be %f", myStats->sampleMean, expectedMeanNoMaskF64);
     319        is_float_tol(myStats->sampleMean, expectedMeanNoMaskF64, 1e-4, "The mean was %f, should be %f", myStats->sampleMean, expectedMeanNoMaskF64);
    320320        psFree(myStats);
    321321        psFree(myVector);
  • trunk/psLib/test/math/tap_psStats01.c

    r11420 r12607  
    88*  @author GLG, MHPCC
    99*
    10 *  @version $Revision: 1.3 $  $Name: not supported by cvs2svn $
    11 *  @date $Date: 2007-01-30 04:41:51 $
     10*  @version $Revision: 1.4 $  $Name: not supported by cvs2svn $
     11*  @date $Date: 2007-03-27 22:52:03 $
    1212*
    1313* Copyright 2004-2005 Maui High Performance Computing Center, Univ. of Hawaii
     
    6363        ok(result, "psVectorStats suceeded");
    6464        ok(!isnan(myStats->max), "psVectorStats() returned non-NAN");
    65         ok_float_tol(myStats->max, expectedMaxNoMaskF32, 1e-4,
     65        is_float_tol(myStats->max, expectedMaxNoMaskF32, 1e-4,
    6666                     "The max was %f, should be %f", myStats->max, expectedMaxNoMaskF32);
    6767        ok(!psMemCheckLeaks (id, NULL, NULL, false), "no memory leaks");
     
    7474        ok(result, "psVectorStats suceeded");
    7575        ok(!isnan(myStats->max), "psVectorStats() returned non-NAN");
    76         ok_float_tol(myStats->max, expectedMaxWithMaskF32, 1e-4,
     76        is_float_tol(myStats->max, expectedMaxWithMaskF32, 1e-4,
    7777                     "The max was %f, should be %f", myStats->max, expectedMaxWithMaskF32);
    7878        ok(!psMemCheckLeaks (id, NULL, NULL, false), "no memory leaks");
     
    8888        ok(result, "psVectorStats suceeded");
    8989        ok(!isnan(myStats->max), "psVectorStats() returned non-NAN");
    90         ok_float_tol(myStats->max, expectedMaxRangeNoMaskF32, 1e-4,
     90        is_float_tol(myStats->max, expectedMaxRangeNoMaskF32, 1e-4,
    9191                     "The max was %f, should be %f", myStats->max, expectedMaxRangeNoMaskF32);
    9292        ok(!psMemCheckLeaks (id, NULL, NULL, false), "no memory leaks");
     
    101101        ok(result, "psVectorStats suceeded");
    102102        ok(!isnan(myStats->max), "psVectorStats() returned non-NAN");
    103         ok_float_tol(myStats->max, expectedMaxRangeWithMaskF32, 1e-4,
     103        is_float_tol(myStats->max, expectedMaxRangeWithMaskF32, 1e-4,
    104104                     "The max was %f, should be %f", myStats->max, expectedMaxRangeWithMaskF32);
    105105        ok(!psMemCheckLeaks (id, NULL, NULL, false), "no memory leaks");
     
    136136        ok(result, "psVectorStats suceeded");
    137137        ok(!isnan(myStats->max), "psVectorStats() returned non-NAN");
    138         ok_float_tol(myStats->max, expectedMaxNoMaskS8, 1e-4,
     138        is_float_tol(myStats->max, expectedMaxNoMaskS8, 1e-4,
    139139                     "The max was %f, should be %f", myStats->max, expectedMaxNoMaskS8);
    140140        psFree(myStats);
     
    157157        ok(result, "psVectorStats suceeded");
    158158        ok(!isnan(myStats->max), "psVectorStats() returned non-NAN");
    159         ok_float_tol(myStats->max, expectedMaxNoMaskU16, 1e-4,
     159        is_float_tol(myStats->max, expectedMaxNoMaskU16, 1e-4,
    160160                     "The max was %f, should be %f", myStats->max, expectedMaxNoMaskU16);
    161161        psFree(myStats);
     
    178178        ok(result, "psVectorStats suceeded");
    179179        ok(!isnan(myStats->max), "psVectorStats() returned non-NAN");
    180         ok_float_tol(myStats->max, expectedMaxNoMaskF64, 1e-4,
     180        is_float_tol(myStats->max, expectedMaxNoMaskF64, 1e-4,
    181181                     "The max was %f, should be %f", myStats->max, expectedMaxNoMaskF64);
    182182        psFree(myStats);
  • trunk/psLib/test/math/tap_psStats02.c

    r11420 r12607  
    1111*  @author GLG, MHPCC
    1212*
    13 *  @version $Revision: 1.3 $  $Name: not supported by cvs2svn $
    14 *  @date $Date: 2007-01-30 04:41:51 $
     13*  @version $Revision: 1.4 $  $Name: not supported by cvs2svn $
     14*  @date $Date: 2007-03-27 22:52:03 $
    1515*
    1616* Copyright 2004-2005 Maui High Performance Computing Center, Univ. of Hawaii
     
    6767        ok(result, "psVectorStats suceeded");
    6868        ok(!isnan(myStats->min), "psVectorStats() returned non-NAN");
    69         ok_float_tol(myStats->min, expectedMinNoMaskF32, 1e-4,
     69        is_float_tol(myStats->min, expectedMinNoMaskF32, 1e-4,
    7070                     "The min was %f, should be %f", myStats->min, expectedMinNoMaskF32);
    7171        ok(!psMemCheckLeaks (id, NULL, NULL, false), "no memory leaks");
     
    8080        ok(result, "psVectorStats suceeded");
    8181        ok(!isnan(myStats->min), "psVectorStats() returned non-NAN");
    82         ok_float_tol(myStats->min, expectedMinWithMaskF32, 1e-4,
     82        is_float_tol(myStats->min, expectedMinWithMaskF32, 1e-4,
    8383                     "The min was %f, should be %f", myStats->min, expectedMinWithMaskF32);
    8484        ok(!psMemCheckLeaks (id, NULL, NULL, false), "no memory leaks");
     
    9494        ok(result, "psVectorStats suceeded");
    9595        ok(!isnan(myStats->min), "psVectorStats() returned non-NAN");
    96         ok_float_tol(myStats->min, expectedMinRangeNoMaskF32, 1e-4,
     96        is_float_tol(myStats->min, expectedMinRangeNoMaskF32, 1e-4,
    9797                     "The min was %f, should be %f", myStats->min, expectedMinRangeNoMaskF32);
    9898        ok(!psMemCheckLeaks (id, NULL, NULL, false), "no memory leaks");
     
    107107        ok(result, "psVectorStats succeeded");
    108108        ok(!isnan(myStats->min), "psVectorStats() returned non-NAN");
    109         ok_float_tol(myStats->min, expectedMinRangeWithMaskF32, 1e-4,
     109        is_float_tol(myStats->min, expectedMinRangeWithMaskF32, 1e-4,
    110110                     "The min was %f, should be %f", myStats->min, expectedMinRangeWithMaskF32);
    111111        ok(!psMemCheckLeaks (id, NULL, NULL, false), "no memory leaks");
     
    142142        ok(result, "psVectorStats succeeded");
    143143        ok(!isnan(myStats->min), "psVectorStats() returned non-NAN");
    144         ok_float_tol(myStats->min, expectedMinNoMaskS8, 1e-4,
     144        is_float_tol(myStats->min, expectedMinNoMaskS8, 1e-4,
    145145                     "The min was %f, should be %f", myStats->min, expectedMinNoMaskS8);
    146146        psFree(myStats);
     
    163163        ok(result, "psVectorStats succeeded");
    164164        ok(!isnan(myStats->min), "psVectorStats() returned non-NAN");
    165         ok_float_tol(myStats->min, expectedMinNoMaskU16, 1e-4,
     165        is_float_tol(myStats->min, expectedMinNoMaskU16, 1e-4,
    166166                     "The min was %f, should be %f", myStats->min, expectedMinNoMaskU16);
    167167        psFree(myStats);
     
    184184        ok(result, "psVectorStats succeeded");
    185185        ok(!isnan(myStats->min), "psVectorStats() returned non-NAN");
    186         ok_float_tol(myStats->min, expectedMinNoMaskF64, 1e-4,
     186        is_float_tol(myStats->min, expectedMinNoMaskF64, 1e-4,
    187187                     "The min was %f, should be %f", myStats->min, expectedMinNoMaskF64);
    188188        psFree(myStats);
  • trunk/psLib/test/math/tap_psStats03.c

    r11420 r12607  
    4444        ok(result, "psVectorStats succeeded");
    4545        ok(!isnan(myStats->sampleMedian), "psVectorStats() returned non-NAN");
    46         ok_float_tol(myStats->sampleMedian, realMedianNoMask, 1e-4,
     46        is_float_tol(myStats->sampleMedian, realMedianNoMask, 1e-4,
    4747                     "The sample median was %f, should be %f", myStats->sampleMedian, realMedianNoMask);
    4848        ok(!psMemCheckLeaks (id, NULL, NULL, false), "no memory leaks");
     
    5555        ok(result, "psVectorStats succeeded");
    5656        ok(!isnan(myStats->sampleMedian), "psVectorStats() returned non-NAN");
    57         ok_float_tol(myStats->sampleMedian, realMedianWithMask, 1e-4,
     57        is_float_tol(myStats->sampleMedian, realMedianWithMask, 1e-4,
    5858                     "The sample median was %f, should be %f", myStats->sampleMedian, realMedianWithMask);
    5959        ok(!psMemCheckLeaks (id, NULL, NULL, false), "no memory leaks");
  • trunk/psLib/test/math/tap_psStats06.c

    r11420 r12607  
    4545        ok(result, "psVectorStats succeeded");
    4646        ok(!isnan(myStats->sampleStdev), "psVectorStats() returned non-NAN");
    47         ok_float_tol(myStats->sampleStdev, realStdevNoMask, 1e-4,
     47        is_float_tol(myStats->sampleStdev, realStdevNoMask, 1e-4,
    4848                     "The mean was %f, should be %f", myStats->sampleStdev, realStdevNoMask);
    4949        ok(!psMemCheckLeaks (id, NULL, NULL, false), "no memory leaks");
     
    5656        ok(result, "psVectorStats succeeded");
    5757        ok(!isnan(myStats->sampleStdev), "psVectorStats() returned non-NAN");
    58         ok_float_tol(myStats->sampleStdev, realStdevWithMask, 1e-4,
     58        is_float_tol(myStats->sampleStdev, realStdevWithMask, 1e-4,
    5959                     "The mean was %f, should be %f", myStats->sampleStdev, realStdevWithMask);
    6060        ok(!psMemCheckLeaks (id, NULL, NULL, false), "no memory leaks");
  • trunk/psLib/test/math/tap_psStats08.c

    r11661 r12607  
    4545        ok(result, "psVectorStats succeeded");
    4646        ok(!isnan(myStats->sampleLQ), "psVectorStats() returned non-NAN");
    47         ok_float_tol(myStats->sampleLQ, realLQNoMask, 1e-4,
     47        is_float_tol(myStats->sampleLQ, realLQNoMask, 1e-4,
    4848                     "The sampleLQ was %f, should be %f", myStats->sampleLQ, realLQNoMask);
    4949        ok(!psMemCheckLeaks (id, NULL, NULL, false), "no memory leaks");
     
    5656        ok(result, "psVectorStats succeeded");
    5757        ok(!isnan(myStats->sampleUQ), "psVectorStats() returned non-NAN");
    58         ok_float_tol(myStats->sampleUQ, realUQNoMask, 1e-4,
     58        is_float_tol(myStats->sampleUQ, realUQNoMask, 1e-4,
    5959                     "The sampleUQ was %f, should be %f", myStats->sampleUQ, realUQNoMask);
    6060        ok(!psMemCheckLeaks (id, NULL, NULL, false), "no memory leaks");
     
    6767        ok(result, "psVectorStats succeeded");
    6868        ok(!isnan(myStats->sampleLQ), "psVectorStats() returned non-NAN");
    69         ok_float_tol(myStats->sampleLQ, realLQWithMask, 1e-4,
     69        is_float_tol(myStats->sampleLQ, realLQWithMask, 1e-4,
    7070                     "The sampleLQ was %f, should be %f", myStats->sampleLQ,
    7171                     realLQWithMask);
     
    7979        ok(result, "psVectorStats succeeded");
    8080        ok(!isnan(myStats->sampleUQ), "psVectorStats() returned non-NAN");
    81         ok_float_tol(myStats->sampleUQ, realUQWithMask, 1e-4,
     81        is_float_tol(myStats->sampleUQ, realUQWithMask, 1e-4,
    8282                     "The sampleUQ was %f, should be %f", myStats->sampleUQ,
    8383                     realUQWithMask);
Note: See TracChangeset for help on using the changeset viewer.