diff options
Diffstat (limited to 'src/statisticsFunctions')
-rw-r--r-- | src/statisticsFunctions/variance/testDoubleVarianceNono.c | 14 | ||||
-rw-r--r-- | src/statisticsFunctions/variance/testFloatVarianceNono.c | 15 |
2 files changed, 25 insertions, 4 deletions
diff --git a/src/statisticsFunctions/variance/testDoubleVarianceNono.c b/src/statisticsFunctions/variance/testDoubleVarianceNono.c index e1047238..92f76b81 100644 --- a/src/statisticsFunctions/variance/testDoubleVarianceNono.c +++ b/src/statisticsFunctions/variance/testDoubleVarianceNono.c @@ -48,6 +48,9 @@ static int doubleVariance(void){ for (i=0;i<4;i++)assert(fabs(outRows[i]-resultRows[i])/fabs(outRows[i]) <1e-16); for (i=0;i<5;i++)assert(fabs(outColumns[i]-resultColumns[i])/fabs(outColumns[i]) <1e-16); + + free(outColumns); + free(outRows); } @@ -119,7 +122,9 @@ static int doubleVariance(void){ for (i=0;i<10;i++)assert(fabs(outRows2[i]-resultRows2[i])/fabs(outRows2[i]) <1e-16); for (i=0;i<7;i++)assert(fabs(outColumns2[i]-resultColumns2[i])/fabs(outColumns2[i]) <1e-16); - + + free(outColumns2); + free(outRows2); } @@ -187,7 +192,9 @@ static int doubleComplexVariance(void){ assert(fabs(zimags(outCol[i])-colVarianceI[i])/fabs(zimags(outCol[i])) <1e-15); } - + free(in); + free(outCol); + free(outRow); } @@ -325,6 +332,9 @@ static int doubleComplexVariance(void){ assert(fabs(zreals(outCol[i])-colVarianceR[i])/fabs(zreals(outCol[i])) <1e-15); assert(fabs(zimags(outCol[i])-colVarianceI[i])/fabs(zimags(outCol[i])) <1e-14); } + free(in); + free(outCol); + free(outRow); } diff --git a/src/statisticsFunctions/variance/testFloatVarianceNono.c b/src/statisticsFunctions/variance/testFloatVarianceNono.c index dff7d4e1..71c9b859 100644 --- a/src/statisticsFunctions/variance/testFloatVarianceNono.c +++ b/src/statisticsFunctions/variance/testFloatVarianceNono.c @@ -48,7 +48,9 @@ static int floatVariance(void){ for (i=0;i<4;i++)assert(fabs(outRows[i]-resultRows[i])/fabs(outRows[i]) <1e-06); for (i=0;i<5;i++)assert(fabs(outColumns[i]-resultColumns[i])/fabs(outColumns[i]) <1e-06); - + + free(outColumns); + free(outRows); } @@ -118,7 +120,10 @@ static int floatVariance(void){ assert(fabs(out2-result2)/fabs(out2) <1e-06); for (i=0;i<10;i++)assert(fabs(outRows2[i]-resultRows2[i])/fabs(outRows2[i]) <1e-06); - for (i=0;i<7;i++)assert(fabs(outColumns2[i]-resultColumns2[i])/fabs(outColumns2[i]) <1e-06); + for (i=0;i<7;i++)assert(fabs(outColumns2[i]-resultColumns2[i])/fabs(outColumns2[i]) <1e-06); + + free(outColumns2); + free(outRows2); } @@ -187,6 +192,9 @@ static int floatComplexVariance(void){ assert(fabs(cimags(outCol[i])-colVarianceI[i])/fabs(cimags(outCol[i])) <1e-5); } + free(in); + free(outCol); + free(outRow); } @@ -326,6 +334,9 @@ static int floatComplexVariance(void){ assert(fabs(cimags(outCol[i])-colVarianceI[i])/fabs(cimags(outCol[i])) <1e-5); } + free(in); + free(outCol); + free(outRow); } return 0; |