diff options
author | jofret | 2009-07-23 05:21:06 +0000 |
---|---|---|
committer | jofret | 2009-07-23 05:21:06 +0000 |
commit | 4d8c7539dbe5d054970fe33e93b648952e1e8fed (patch) | |
tree | f66d6b86d2ca7e8e89f16ff1f2baf6eb3b45c2ea /src/c/statisticsFunctions/sum/testDoubleSum.c | |
parent | 1dc9ec957915548774569cf2e0dc2a4480ecc7d4 (diff) | |
download | scilab2c-4d8c7539dbe5d054970fe33e93b648952e1e8fed.tar.gz scilab2c-4d8c7539dbe5d054970fe33e93b648952e1e8fed.tar.bz2 scilab2c-4d8c7539dbe5d054970fe33e93b648952e1e8fed.zip |
Correct test
Diffstat (limited to 'src/c/statisticsFunctions/sum/testDoubleSum.c')
-rw-r--r-- | src/c/statisticsFunctions/sum/testDoubleSum.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/c/statisticsFunctions/sum/testDoubleSum.c b/src/c/statisticsFunctions/sum/testDoubleSum.c index c5e2af2d..b411a7de 100644 --- a/src/c/statisticsFunctions/sum/testDoubleSum.c +++ b/src/c/statisticsFunctions/sum/testDoubleSum.c @@ -40,7 +40,7 @@ static int dsumaTest(void) { printf("\n>>>> Sum Double Array Test\n"); assert(dsuma(table1, 3) == 9.0); - assert((dsuma(table2, 5) - (9.186784 + 9.186784 + 9.186784 + 9.186784 + 9.186784)) / dsuma(table2, 5) < 3e-16); + assert((dsuma(table2, 5) - (9.186784653 + 9.186785634 + 9.186784563 + 9.186784563 + 9.186784563)) < 3e-16); return 0; } @@ -319,12 +319,12 @@ static int zrowsumaTest(void) { } assert(zreals(rowSummedIn_2_6[0]) == 0.1 && zimags(rowSummedIn_2_6[0]) == 2.1); assert(zreals(rowSummedIn_2_6[1]) == 0.5); - assert(fabs(double(zimags(rowSummedIn_2_6[1]) == 1.7)) < 1e-16); + assert(fabs(zimags(rowSummedIn_2_6[1]) - 1.7) < 3e-16); assert(zreals(rowSummedIn_2_6[2]) == 0.9); - assert(fabs(double(zimags(rowSummedIn_2_6[2]) == 1.3)) < 1e-16); - assert(fabs(double(zreals(rowSummedIn_2_6[3]) == 1.3)) < 1e-16); + assert(fabs(zimags(rowSummedIn_2_6[2]) - 1.3) < 3e-16); + assert(fabs(zreals(rowSummedIn_2_6[3]) - 1.3) < 3e-16); assert(zimags(rowSummedIn_2_6[3]) == 0.9); - assert(fabs(double(zreals(rowSummedIn_2_6[4]) == 1.7)) < 1e-16); + assert(fabs(zreals(rowSummedIn_2_6[4]) - 1.7) < 3e-16); assert(zimags(rowSummedIn_2_6[4]) == 0.5); assert(zreals(rowSummedIn_2_6[5]) == 2.1 && zimags(rowSummedIn_2_6[5]) == 0.1); |