summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--scilab2c/src/signalProcessing/conv/Makefile.am1
-rw-r--r--scilab2c/src/signalProcessing/conv/Makefile.in1
-rw-r--r--scilab2c/src/signalProcessing/conv/testDoubleConv.c24
-rw-r--r--scilab2c/src/signalProcessing/conv/testFloatConv.c6
-rw-r--r--scilab2c/src/signalProcessing/conv2d/testDoubleConv2d.c8
-rw-r--r--scilab2c/src/signalProcessing/conv2d/testFloatConv2d.c2
-rw-r--r--scilab2c/src/signalProcessing/fft/testDoubleFft.c64
-rw-r--r--scilab2c/src/signalProcessing/fft/testFloatFft.c64
-rw-r--r--scilab2c/src/signalProcessing/fft/testMatFft.c36
-rw-r--r--scilab2c/src/signalProcessing/hilbert/Makefile.am1
-rw-r--r--scilab2c/src/signalProcessing/hilbert/Makefile.in1
-rw-r--r--scilab2c/src/signalProcessing/hilbert/testHilbert.c52
-rw-r--r--scilab2c/src/signalProcessing/ifft/testDoubleIfft.c64
-rw-r--r--scilab2c/src/signalProcessing/ifft/testFloatIfft.c68
-rw-r--r--scilab2c/src/signalProcessing/ifft/testMatIfft.c36
-rw-r--r--scilab2c/src/signalProcessing/lev/testDoubleLev.c26
-rw-r--r--scilab2c/src/signalProcessing/lev/testFloatLev.c2
-rw-r--r--scilab2c/src/signalProcessing/levin/testDoubleLevin.c6
-rw-r--r--scilab2c/src/signalProcessing/levin/testFloatLevin.c6
-rw-r--r--scilab2c/src/signalProcessing/lpc2cep/Makefile.am9
-rw-r--r--scilab2c/src/signalProcessing/lpc2cep/Makefile.in45
21 files changed, 280 insertions, 242 deletions
diff --git a/scilab2c/src/signalProcessing/conv/Makefile.am b/scilab2c/src/signalProcessing/conv/Makefile.am
index 4ab5a6bc..5599b11e 100644
--- a/scilab2c/src/signalProcessing/conv/Makefile.am
+++ b/scilab2c/src/signalProcessing/conv/Makefile.am
@@ -47,6 +47,7 @@ check_LDADD = $(top_builddir)/type/libDoubleComplex.la \
$(top_builddir)/lib/blas/libsciblas.la \
$(top_builddir)/operations/addition/libAddition.la \
$(top_builddir)/operations/subtraction/libSubtraction.la \
+ $(top_builddir)/matrixOperations/zeros/libMatrixZeros.la \
libConv.la
diff --git a/scilab2c/src/signalProcessing/conv/Makefile.in b/scilab2c/src/signalProcessing/conv/Makefile.in
index 1fea8f10..fc30bca4 100644
--- a/scilab2c/src/signalProcessing/conv/Makefile.in
+++ b/scilab2c/src/signalProcessing/conv/Makefile.in
@@ -227,6 +227,7 @@ check_LDADD = $(top_builddir)/type/libDoubleComplex.la \
$(top_builddir)/lib/blas/libsciblas.la \
$(top_builddir)/operations/addition/libAddition.la \
$(top_builddir)/operations/subtraction/libSubtraction.la \
+ $(top_builddir)/matrixOperations/zeros/libMatrixZeros.la \
libConv.la
check_INCLUDES = -I $(top_builddir)/type \
diff --git a/scilab2c/src/signalProcessing/conv/testDoubleConv.c b/scilab2c/src/signalProcessing/conv/testDoubleConv.c
index b552b46a..bf09104e 100644
--- a/scilab2c/src/signalProcessing/conv/testDoubleConv.c
+++ b/scilab2c/src/signalProcessing/conv/testDoubleConv.c
@@ -37,22 +37,22 @@ static void dconvaTest(void){
dconva(x1,2,h1,1,out1);
for (i=0;i<2;i++){
- assert( ( fabs(out1[i]-conv1[i]) / fabs(out1[i]) ) <1e-15);
+ assert( ( fabs(out1[i]-conv1[i]) / fabs(out1[i]) ) <3e-16);
}
dconva(h1,1,x1,2,out1);
for (i=0;i<2;i++){
- assert( ( fabs(out1[i]-conv1[i]) / fabs(out1[i]) ) <1e-15);
+ assert( ( fabs(out1[i]-conv1[i]) / fabs(out1[i]) ) <3e-16);
}
dconva(x2,8,h2,5,out2);
for (i=0;i<12;i++){
- assert( ( fabs(out2[i]-conv2[i]) / fabs(out2[i]) ) <1e-15);
+ assert( ( fabs(out2[i]-conv2[i]) / fabs(out2[i]) ) <3e-16);
}
dconva(h2,5,x2,8,out2);
for (i=0;i<12;i++){
- assert( ( fabs(out2[i]-conv2[i]) / fabs(out2[i]) ) <1e-15);
+ assert( ( fabs(out2[i]-conv2[i]) / fabs(out2[i]) ) <3e-16);
}
}
@@ -94,26 +94,26 @@ static void zconvaTest(void){
zconva(x1,2,h1,1,out1);
for (i=0;i<2;i++){
- assert( ( fabs(zreals(out1[i])-rconv1[i]) / fabs(zreals(out1[i])) ) <1e-15);
- assert( ( fabs(zimags(out1[i])-iconv1[i]) / fabs(zimags(out1[i])) ) <1e-15);
+ assert( ( fabs(zreals(out1[i])-rconv1[i]) / fabs(zreals(out1[i])) ) <3e-16);
+ assert( ( fabs(zimags(out1[i])-iconv1[i]) / fabs(zimags(out1[i])) ) <3e-16);
}
zconva(h1,1,x1,2,out1);
for (i=0;i<2;i++){
- assert( ( fabs(zreals(out1[i])-rconv1[i]) / fabs(zreals(out1[i])) ) <1e-15);
- assert( ( fabs(zimags(out1[i])-iconv1[i]) / fabs(zimags(out1[i])) ) <1e-15);
+ assert( ( fabs(zreals(out1[i])-rconv1[i]) / fabs(zreals(out1[i])) ) <3e-16);
+ assert( ( fabs(zimags(out1[i])-iconv1[i]) / fabs(zimags(out1[i])) ) <3e-16);
}
zconva(x2,4,h2,7,out2);
for (i=0;i<7;i++){
- assert( ( fabs(zreals(out2[i])-rconv2[i]) / fabs(zreals(out2[i])) ) <1e-15);
- assert( ( fabs(zimags(out2[i])-iconv2[i]) / fabs(zimags(out2[i])) ) <1e-15);
+ assert( ( fabs(zreals(out2[i])-rconv2[i]) / fabs(zreals(out2[i])) ) <3e-16);
+ assert( ( fabs(zimags(out2[i])-iconv2[i]) / fabs(zimags(out2[i])) ) <3e-16);
}
zconva(h2,7,x2,4,out2);
for (i=0;i<10;i++){
- assert( ( fabs(zreals(out2[i])-rconv2[i]) / fabs(zreals(out2[i])) ) <1e-14);
- assert( ( fabs(zimags(out2[i])-iconv2[i]) / fabs(zimags(out2[i])) ) <1e-15);
+ assert( ( fabs(zreals(out2[i])-rconv2[i]) / fabs(zreals(out2[i])) ) <3e-16);
+ assert( ( fabs(zimags(out2[i])-iconv2[i]) / fabs(zimags(out2[i])) ) <3e-16);
}
}
diff --git a/scilab2c/src/signalProcessing/conv/testFloatConv.c b/scilab2c/src/signalProcessing/conv/testFloatConv.c
index 787ab2cd..932f3752 100644
--- a/scilab2c/src/signalProcessing/conv/testFloatConv.c
+++ b/scilab2c/src/signalProcessing/conv/testFloatConv.c
@@ -107,13 +107,13 @@ static void cconvaTest(void){
cconva(x2,4,h2,7,out2);
for (i=0;i<10;i++){
- assert( ( fabs(creals(out2[i])-rconv2[i]) / fabs(creals(out2[i])) ) <1e-5);
+ assert( ( fabs(creals(out2[i])-rconv2[i]) / fabs(creals(out2[i])) ) <3e-6);
assert( ( fabs(cimags(out2[i])-iconv2[i]) / fabs(cimags(out2[i])) ) <1e-6);
}
cconva(h2,7,x2,4,out2);
for (i=0;i<10;i++){
- assert( ( fabs(creals(out2[i])-rconv2[i]) / fabs(creals(out2[i])) ) <1e-5);
+ assert( ( fabs(creals(out2[i])-rconv2[i]) / fabs(creals(out2[i])) ) <3e-6);
assert( ( fabs(cimags(out2[i])-iconv2[i]) / fabs(cimags(out2[i])) ) <1e-6);
}
@@ -122,7 +122,7 @@ static void cconvaTest(void){
static int convTest(void){
- printf("\n>>>> Conv Double Tests\n");
+ printf("\n>>>> Conv Float Tests\n");
sconvaTest();
cconvaTest();
return 0;
diff --git a/scilab2c/src/signalProcessing/conv2d/testDoubleConv2d.c b/scilab2c/src/signalProcessing/conv2d/testDoubleConv2d.c
index e1ce9589..c4021388 100644
--- a/scilab2c/src/signalProcessing/conv2d/testDoubleConv2d.c
+++ b/scilab2c/src/signalProcessing/conv2d/testDoubleConv2d.c
@@ -70,12 +70,12 @@ static void dconv2daTest(void){
double inTest2[] = {1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16};
dconv2da(in1,3,3,in2,4,4,out);
for (i=0;i<36;i++){
- assert( ( fabs(out[i]-res[i]) / fabs(out[i]) ) <1e-15);
+ assert( ( fabs(out[i]-res[i]) / fabs(out[i]) ) <3e-16);
}
dconv2da(test1,1,3,test1,3,1,outTest);
for (i=0;i<9;i++){
- assert( ( fabs(outTest[i]-resTest[i]) / fabs(outTest[i]) ) <1e-15);
+ assert( ( fabs(outTest[i]-resTest[i]) / fabs(outTest[i]) ) <3e-16);
}
dconv2da(inTest1,12,1,inTest2,1,16,outTest2);
@@ -100,8 +100,8 @@ static void zconv2daTest(void){
in2=DoubleComplexMatrix(rin2,iin2,16);
zconv2da(in1,2,2,in2,4,4,out);
for (i=0;i<25;i++){
- assert( ( fabs(zreals(out[i])-rres[i]) / fabs(zreals(out[i])) ) <1e-14);
- assert( ( fabs(zimags(out[i])-ires[i]) / fabs(zimags(out[i])) ) <1e-15);
+ assert( ( fabs(zreals(out[i])-rres[i]) / fabs(zreals(out[i])) ) <3e-16);
+ assert( ( fabs(zimags(out[i])-ires[i]) / fabs(zimags(out[i])) ) <3e-16);
}
}
diff --git a/scilab2c/src/signalProcessing/conv2d/testFloatConv2d.c b/scilab2c/src/signalProcessing/conv2d/testFloatConv2d.c
index e4c071e6..b812c465 100644
--- a/scilab2c/src/signalProcessing/conv2d/testFloatConv2d.c
+++ b/scilab2c/src/signalProcessing/conv2d/testFloatConv2d.c
@@ -88,7 +88,7 @@ static void cconv2daTest(void){
in2=FloatComplexMatrix(rin2,iin2,16);
cconv2da(in1,2,2,in2,4,4,out);
for (i=0;i<25;i++){
- assert( ( fabs(creals(out[i])-rres[i]) / fabs(creals(out[i])) ) <1e-5);
+ assert( ( fabs(creals(out[i])-rres[i]) / fabs(creals(out[i])) ) <3e-6);
assert( ( fabs(cimags(out[i])-ires[i]) / fabs(cimags(out[i])) ) <1e-7);
}
}
diff --git a/scilab2c/src/signalProcessing/fft/testDoubleFft.c b/scilab2c/src/signalProcessing/fft/testDoubleFft.c
index 36a5c391..6198e4e0 100644
--- a/scilab2c/src/signalProcessing/fft/testDoubleFft.c
+++ b/scilab2c/src/signalProcessing/fft/testDoubleFft.c
@@ -343,13 +343,13 @@ static void zfftmaTest2 (void )
if ( zreals(out[i]) < 1e-14 && zreals (Result[i]) < 1e-18 )
assert ( 1 ) ;
else
- assert ( fabs( zreals(out[i]) - zreals (Result[i]) ) / fabs (zreals (out[i])) < 1e-12 );
+ assert ( fabs( zreals(out[i]) - zreals (Result[i]) ) / fabs (zreals (out[i])) < 3e-16 );
if ( zimags(out[i]) < 1e-14 && zimags (Result[i]) < 1e-18 )
assert ( 1 ) ;
else
- assert ( fabs( zimags(out[i]) - zimags (Result[i]) ) / fabs (zimags (out[i])) < 1e-12 ) ;
+ assert ( fabs( zimags(out[i]) - zimags (Result[i]) ) / fabs (zimags (out[i])) < 3e-16 ) ;
}
@@ -398,13 +398,13 @@ static void zfftmaTest3 (void )
if ( zreals(out[i]) < 1e-14 && zreals (Result[i]) < 1e-18 )
assert ( 1 ) ;
else
- assert ( fabs( zreals(out[i]) - zreals (Result[i]) ) / fabs (zreals (out[i])) < 1e-12 );
+ assert ( fabs( zreals(out[i]) - zreals (Result[i]) ) / fabs (zreals (out[i])) < 3e-16 );
if ( zimags(out[i]) < 1e-14 && zimags (Result[i]) < 1e-18 )
assert ( 1 ) ;
else
- assert ( fabs( zimags(out[i]) - zimags (Result[i]) ) / fabs (zimags (out[i])) < 1e-12 ) ;
+ assert ( fabs( zimags(out[i]) - zimags (Result[i]) ) / fabs (zimags (out[i])) < 3e-16 ) ;
}
@@ -447,13 +447,13 @@ static void zfftmaTest4 (void )
if ( zreals(out[i]) < 1e-14 && zreals (Result[i]) < 1e-18 )
assert ( 1 ) ;
else
- assert ( fabs( zreals(out[i]) - zreals (Result[i]) ) / fabs (zreals (out[i])) < 1e-12 );
+ assert ( fabs( zreals(out[i]) - zreals (Result[i]) ) / fabs (zreals (out[i])) < 3e-16 );
if ( zimags(out[i]) < 1e-14 && zimags (Result[i]) < 1e-18 )
assert ( 1 ) ;
else
- assert ( fabs( zimags(out[i]) - zimags (Result[i]) ) / fabs (zimags (out[i])) < 1e-12 ) ;
+ assert ( fabs( zimags(out[i]) - zimags (Result[i]) ) / fabs (zimags (out[i])) < 3e-16 ) ;
}
@@ -503,13 +503,13 @@ static void zfftmaTest5 (void )
if ( zreals(out[i]) < 1e-14 && zreals (Result[i]) < 1e-18 )
assert ( 1 ) ;
else
- assert ( fabs( zreals(out[i]) - zreals (Result[i]) ) / fabs (zreals (out[i])) < 1e-12 );
+ assert ( fabs( zreals(out[i]) - zreals (Result[i]) ) / fabs (zreals (out[i])) < 3e-16 );
if ( zimags(out[i]) < 1e-14 && zimags (Result[i]) < 1e-18 )
assert ( 1 ) ;
else
- assert ( fabs( zimags(out[i]) - zimags (Result[i]) ) / fabs (zimags (out[i])) < 1e-12 ) ;
+ assert ( fabs( zimags(out[i]) - zimags (Result[i]) ) / fabs (zimags (out[i])) < 3e-16 ) ;
}
@@ -559,13 +559,13 @@ static void zfftmaTest6 (void )
if ( zreals(out[i]) < 1e-14 && zreals (Result[i]) < 1e-18 )
assert ( 1 ) ;
else
- assert ( fabs( zreals(out[i]) - zreals (Result[i]) ) / fabs (zreals (out[i])) < 1e-12 );
+ assert ( fabs( zreals(out[i]) - zreals (Result[i]) ) / fabs (zreals (out[i])) < 3e-16 );
if ( zimags(out[i]) < 1e-14 && zimags (Result[i]) < 1e-18 )
assert ( 1 ) ;
else
- assert ( fabs( zimags(out[i]) - zimags (Result[i]) ) / fabs (zimags (out[i])) < 1e-12 ) ;
+ assert ( fabs( zimags(out[i]) - zimags (Result[i]) ) / fabs (zimags (out[i])) < 3e-16 ) ;
}
@@ -615,13 +615,13 @@ static void zfftmaTest7 (void )
if ( zreals(out[i]) < 1e-14 && zreals (Result[i]) < 1e-18 )
assert ( 1 ) ;
else
- assert ( fabs( zreals(out[i]) - zreals (Result[i]) ) / fabs (zreals (out[i])) < 1e-12 );
+ assert ( fabs( zreals(out[i]) - zreals (Result[i]) ) / fabs (zreals (out[i])) < 3e-16 );
if ( zimags(out[i]) < 1e-14 && zimags (Result[i]) < 1e-18 )
assert ( 1 ) ;
else
- assert ( fabs( zimags(out[i]) - zimags (Result[i]) ) / fabs (zimags (out[i])) < 1e-12 ) ;
+ assert ( fabs( zimags(out[i]) - zimags (Result[i]) ) / fabs (zimags (out[i])) < 3e-16 ) ;
}
@@ -663,13 +663,13 @@ static void zfftmaTest8 (void )
if ( zreals(out[i]) < 1e-14 && zreals (Result[i]) < 1e-18 )
assert ( 1 ) ;
else
- assert ( fabs( zreals(out[i]) - zreals (Result[i]) ) / fabs (zreals (out[i])) < 1e-12 );
+ assert ( fabs( zreals(out[i]) - zreals (Result[i]) ) / fabs (zreals (out[i])) < 3e-16 );
if ( zimags(out[i]) < 1e-14 && zimags (Result[i]) < 1e-18 )
assert ( 1 ) ;
else
- assert ( fabs( zimags(out[i]) - zimags (Result[i]) ) / fabs (zimags (out[i])) < 1e-12 ) ;
+ assert ( fabs( zimags(out[i]) - zimags (Result[i]) ) / fabs (zimags (out[i])) < 3e-16 ) ;
}
@@ -712,13 +712,13 @@ static void zfftmaTest9 (void )
if ( zreals(out[i]) < 1e-14 && zreals (Result[i]) < 1e-18 )
assert ( 1 ) ;
else
- assert ( fabs( zreals(out[i]) - zreals (Result[i]) ) / fabs (zreals (out[i])) < 1e-12 );
+ assert ( fabs( zreals(out[i]) - zreals (Result[i]) ) / fabs (zreals (out[i])) < 3e-16 );
if ( zimags(out[i]) < 1e-14 && zimags (Result[i]) < 1e-18 )
assert ( 1 ) ;
else
- assert ( fabs( zimags(out[i]) - zimags (Result[i]) ) / fabs (zimags (out[i])) < 1e-12 ) ;
+ assert ( fabs( zimags(out[i]) - zimags (Result[i]) ) / fabs (zimags (out[i])) < 3e-16 ) ;
}
@@ -770,13 +770,13 @@ static void zfftmaTest10 (void )
if ( zreals(out[i]) < 1e-14 && tRealResult[i] < 1e-18 )
assert ( 1 ) ;
else
- assert ( fabs( zreals(out[i]) - tRealResult[i] ) / fabs (zreals (out[i])) < 1e-12 );
+ assert ( fabs( zreals(out[i]) - tRealResult[i] ) / fabs (zreals (out[i])) < 3e-16 );
if ( zimags(out[i]) < 1e-14 && tImagResult[i] < 1e-18 )
assert ( 1 ) ;
else
- assert ( fabs( zimags(out[i]) - tImagResult[i] ) / fabs (zimags (out[i])) < 1e-12 ) ;
+ assert ( fabs( zimags(out[i]) - tImagResult[i] ) / fabs (zimags (out[i])) < 3e-16 ) ;
}
@@ -826,13 +826,13 @@ static void zfftmaTest11 (void )
if ( zreals(out[i]) < 1e-14 && tRealResult[i] < 1e-18 )
assert ( 1 ) ;
else
- assert ( fabs( zreals(out[i]) - tRealResult[i] ) / fabs (zreals (out[i])) < 1e-12 );
+ assert ( fabs( zreals(out[i]) - tRealResult[i] ) / fabs (zreals (out[i])) < 3e-16 );
if ( zimags(out[i]) < 1e-14 && tImagResult[i] < 1e-18 )
assert ( 1 ) ;
else
- assert ( fabs( zimags(out[i]) - tImagResult[i] ) / fabs (zimags (out[i])) < 1e-12 ) ;
+ assert ( fabs( zimags(out[i]) - tImagResult[i] ) / fabs (zimags (out[i])) < 3e-16 ) ;
}
@@ -883,13 +883,13 @@ static void zfftmaTest12 (void )
if ( zreals(out[i]) < 1e-14 && tRealResult[i] < 1e-18 )
assert ( 1 ) ;
else
- assert ( fabs( zreals(out[i]) - tRealResult[i] ) / fabs (zreals (out[i])) < 1e-12 );
+ assert ( fabs( zreals(out[i]) - tRealResult[i] ) / fabs (zreals (out[i])) < 3e-16 );
if ( zimags(out[i]) < 1e-14 && tImagResult[i] < 1e-18 )
assert ( 1 ) ;
else
- assert ( fabs( zimags(out[i]) - tImagResult[i] ) / fabs (zimags (out[i])) < 1e-12 ) ;
+ assert ( fabs( zimags(out[i]) - tImagResult[i] ) / fabs (zimags (out[i])) < 3e-16 ) ;
}
@@ -940,13 +940,13 @@ static void zfftmaTest13 (void )
if ( zreals(out[i]) < 1e-14 && tRealResult[i] < 1e-18 )
assert ( 1 ) ;
else
- assert ( fabs( zreals(out[i]) - tRealResult[i] ) / fabs (zreals (out[i])) < 1e-12 );
+ assert ( fabs( zreals(out[i]) - tRealResult[i] ) / fabs (zreals (out[i])) < 3e-16 );
if ( zimags(out[i]) < 1e-14 && tImagResult[i] < 1e-18 )
assert ( 1 ) ;
else
- assert ( fabs( zimags(out[i]) - tImagResult[i] ) / fabs (zimags (out[i])) < 1e-12 ) ;
+ assert ( fabs( zimags(out[i]) - tImagResult[i] ) / fabs (zimags (out[i])) < 3e-16 ) ;
}
@@ -997,13 +997,13 @@ static void zfftmaTest14 (void )
if ( zreals(out[i]) < 1e-14 && tRealResult[i] < 1e-18 )
assert ( 1 ) ;
else
- assert ( fabs( zreals(out[i]) - tRealResult[i] ) / fabs (zreals (out[i])) < 1e-12 );
+ assert ( fabs( zreals(out[i]) - tRealResult[i] ) / fabs (zreals (out[i])) < 3e-16 );
if ( zimags(out[i]) < 1e-14 && tImagResult[i] < 1e-18 )
assert ( 1 ) ;
else
- assert ( fabs( zimags(out[i]) - tImagResult[i] ) / fabs (zimags (out[i])) < 1e-12 ) ;
+ assert ( fabs( zimags(out[i]) - tImagResult[i] ) / fabs (zimags (out[i])) < 3e-16 ) ;
}
@@ -1055,13 +1055,13 @@ static void zfftmaTest15 (void )
if ( zreals(out[i]) < 1e-14 && tRealResult[i] < 1e-18 )
assert ( 1 ) ;
else
- assert ( fabs( zreals(out[i]) - tRealResult[i] ) / fabs (zreals (out[i])) < 1e-12 );
+ assert ( fabs( zreals(out[i]) - tRealResult[i] ) / fabs (zreals (out[i])) < 3e-16 );
if ( zimags(out[i]) < 1e-14 && tImagResult[i] < 1e-18 )
assert ( 1 ) ;
else
- assert ( fabs( zimags(out[i]) - tImagResult[i] ) / fabs (zimags (out[i])) < 1e-12 ) ;
+ assert ( fabs( zimags(out[i]) - tImagResult[i] ) / fabs (zimags (out[i])) < 3e-16 ) ;
}
@@ -1113,13 +1113,13 @@ static void zfftmaTest16 (void )
if ( zreals(out[i]) < 1e-14 && tRealResult[i] < 1e-18 )
assert ( 1 ) ;
else
- assert ( fabs( zreals(out[i]) - tRealResult[i] ) / fabs (zreals (out[i])) < 1e-12 );
+ assert ( fabs( zreals(out[i]) - tRealResult[i] ) / fabs (zreals (out[i])) < 3e-16 );
if ( zimags(out[i]) < 1e-14 && tImagResult[i] < 1e-18 )
assert ( 1 ) ;
else
- assert ( fabs( zimags(out[i]) - tImagResult[i] ) / fabs (zimags (out[i])) < 1e-12 ) ;
+ assert ( fabs( zimags(out[i]) - tImagResult[i] ) / fabs (zimags (out[i])) < 3e-16 ) ;
}
@@ -1171,13 +1171,13 @@ static void zfftmaTest32 (void )
if ( zreals(out[i]) < 1e-14 && tRealResult[i] < 1e-18 )
assert ( 1 ) ;
else
- assert ( fabs( zreals(out[i]) - tRealResult[i] ) / fabs (zreals (out[i])) < 1e-12 );
+ assert ( fabs( zreals(out[i]) - tRealResult[i] ) / fabs (zreals (out[i])) < 3e-16 );
if ( zimags(out[i]) < 1e-14 && tImagResult[i] < 1e-18 )
assert ( 1 ) ;
else
- assert ( fabs( zimags(out[i]) - tImagResult[i] ) / fabs (zimags (out[i])) < 1e-12 ) ;
+ assert ( fabs( zimags(out[i]) - tImagResult[i] ) / fabs (zimags (out[i])) < 3e-16 ) ;
}
diff --git a/scilab2c/src/signalProcessing/fft/testFloatFft.c b/scilab2c/src/signalProcessing/fft/testFloatFft.c
index 3405b767..edfb35a1 100644
--- a/scilab2c/src/signalProcessing/fft/testFloatFft.c
+++ b/scilab2c/src/signalProcessing/fft/testFloatFft.c
@@ -345,13 +345,13 @@ static void cfftmaTest2 (void )
if ( creals(out[i]) < 1e-14 && creals (Result[i]) < 1e-18 )
assert ( 1 ) ;
else
- assert ( fabs( creals(out[i]) - creals (Result[i]) ) / fabs (creals (out[i])) < 1e-4 );
+ assert ( fabs( creals(out[i]) - creals (Result[i]) ) / fabs (creals (out[i])) < 3e-6 );
if ( cimags(out[i]) < 1e-14 && cimags (Result[i]) < 1e-18 )
assert ( 1 ) ;
else
- assert ( fabs( cimags(out[i]) - cimags (Result[i]) ) / fabs (cimags (out[i])) < 1e-4 ) ;
+ assert ( fabs( cimags(out[i]) - cimags (Result[i]) ) / fabs (cimags (out[i])) < 3e-6 ) ;
}
@@ -399,13 +399,13 @@ static void cfftmaTest3 (void )
if ( creals(out[i]) < 1e-14 && creals (Result[i]) < 1e-18 )
assert ( 1 ) ;
else
- assert ( fabs( creals(out[i]) - creals (Result[i]) ) / fabs (creals (out[i])) < 1e-4 );
+ assert ( fabs( creals(out[i]) - creals (Result[i]) ) / fabs (creals (out[i])) < 3e-6 );
if ( cimags(out[i]) < 1e-14 && cimags (Result[i]) < 1e-18 )
assert ( 1 ) ;
else
- assert ( fabs( cimags(out[i]) - cimags (Result[i]) ) / fabs (cimags (out[i])) < 1e-4 ) ;
+ assert ( fabs( cimags(out[i]) - cimags (Result[i]) ) / fabs (cimags (out[i])) < 3e-6 ) ;
}
@@ -448,13 +448,13 @@ static void cfftmaTest4 (void )
if ( creals(out[i]) < 1e-14 && creals (Result[i]) < 1e-18 )
assert ( 1 ) ;
else
- assert ( fabs( creals(out[i]) - creals (Result[i]) ) / fabs (creals (out[i])) < 1e-4 );
+ assert ( fabs( creals(out[i]) - creals (Result[i]) ) / fabs (creals (out[i])) < 3e-6 );
if ( cimags(out[i]) < 1e-14 && cimags (Result[i]) < 1e-18 )
assert ( 1 ) ;
else
- assert ( fabs( cimags(out[i]) - cimags (Result[i]) ) / fabs (cimags (out[i])) < 1e-4 ) ;
+ assert ( fabs( cimags(out[i]) - cimags (Result[i]) ) / fabs (cimags (out[i])) < 3e-6 ) ;
}
@@ -504,13 +504,13 @@ static void cfftmaTest5 (void )
if ( creals(out[i]) < 1e-14 && creals (Result[i]) < 1e-18 )
assert ( 1 ) ;
else
- assert ( fabs( creals(out[i]) - creals (Result[i]) ) / fabs (creals (out[i])) < 1e-4 );
+ assert ( fabs( creals(out[i]) - creals (Result[i]) ) / fabs (creals (out[i])) < 3e-6 );
if ( cimags(out[i]) < 1e-14 && cimags (Result[i]) < 1e-18 )
assert ( 1 ) ;
else
- assert ( fabs( cimags(out[i]) - cimags (Result[i]) ) / fabs (cimags (out[i])) < 1e-4 ) ;
+ assert ( fabs( cimags(out[i]) - cimags (Result[i]) ) / fabs (cimags (out[i])) < 3e-6 ) ;
}
@@ -560,13 +560,13 @@ static void cfftmaTest6 (void )
if ( creals(out[i]) < 1e-14 && creals (Result[i]) < 1e-18 )
assert ( 1 ) ;
else
- assert ( fabs( creals(out[i]) - creals (Result[i]) ) / fabs (creals (out[i])) < 1e-4 );
+ assert ( fabs( creals(out[i]) - creals (Result[i]) ) / fabs (creals (out[i])) < 3e-6 );
if ( cimags(out[i]) < 1e-14 && cimags (Result[i]) < 1e-18 )
assert ( 1 ) ;
else
- assert ( fabs( cimags(out[i]) - cimags (Result[i]) ) / fabs (cimags (out[i])) < 1e-4 ) ;
+ assert ( fabs( cimags(out[i]) - cimags (Result[i]) ) / fabs (cimags (out[i])) < 3e-6 ) ;
}
@@ -616,13 +616,13 @@ static void cfftmaTest7 (void )
if ( creals(out[i]) < 1e-14 && creals (Result[i]) < 1e-18 )
assert ( 1 ) ;
else
- assert ( fabs( creals(out[i]) - creals (Result[i]) ) / fabs (creals (out[i])) < 1e-4 );
+ assert ( fabs( creals(out[i]) - creals (Result[i]) ) / fabs (creals (out[i])) < 3e-6 );
if ( cimags(out[i]) < 1e-14 && cimags (Result[i]) < 1e-18 )
assert ( 1 ) ;
else
- assert ( fabs( cimags(out[i]) - cimags (Result[i]) ) / fabs (cimags (out[i])) < 1e-4 ) ;
+ assert ( fabs( cimags(out[i]) - cimags (Result[i]) ) / fabs (cimags (out[i])) < 3e-6 ) ;
}
@@ -664,13 +664,13 @@ static void cfftmaTest8 (void )
if ( creals(out[i]) < 1e-14 && creals (Result[i]) < 1e-18 )
assert ( 1 ) ;
else
- assert ( fabs( creals(out[i]) - creals (Result[i]) ) / fabs (creals (out[i])) < 1e-4 );
+ assert ( fabs( creals(out[i]) - creals (Result[i]) ) / fabs (creals (out[i])) < 3e-6 );
if ( cimags(out[i]) < 1e-14 && cimags (Result[i]) < 1e-18 )
assert ( 1 ) ;
else
- assert ( fabs( cimags(out[i]) - cimags (Result[i]) ) / fabs (cimags (out[i])) < 1e-4 ) ;
+ assert ( fabs( cimags(out[i]) - cimags (Result[i]) ) / fabs (cimags (out[i])) < 3e-6 ) ;
}
@@ -713,13 +713,13 @@ static void cfftmaTest9 (void )
if ( creals(out[i]) < 1e-14 && creals (Result[i]) < 1e-18 )
assert ( 1 ) ;
else
- assert ( fabs( creals(out[i]) - creals (Result[i]) ) / fabs (creals (out[i])) < 1e-4 );
+ assert ( fabs( creals(out[i]) - creals (Result[i]) ) / fabs (creals (out[i])) < 3e-6 );
if ( cimags(out[i]) < 1e-14 && cimags (Result[i]) < 1e-18 )
assert ( 1 ) ;
else
- assert ( fabs( cimags(out[i]) - cimags (Result[i]) ) / fabs (cimags (out[i])) < 1e-4 ) ;
+ assert ( fabs( cimags(out[i]) - cimags (Result[i]) ) / fabs (cimags (out[i])) < 3e-6 ) ;
}
@@ -771,13 +771,13 @@ static void cfftmaTest10 (void )
if ( creals(out[i]) < 1e-14 && tRealResult[i] < 1e-18 )
assert ( 1 ) ;
else
- assert ( fabs( creals(out[i]) - tRealResult[i] ) / fabs (creals (out[i])) < 1e-4 );
+ assert ( fabs( creals(out[i]) - tRealResult[i] ) / fabs (creals (out[i])) < 3e-6 );
if ( cimags(out[i]) < 1e-14 && tImagResult[i] < 1e-18 )
assert ( 1 ) ;
else
- assert ( fabs( cimags(out[i]) - tImagResult[i] ) / fabs (cimags (out[i])) < 1e-4 ) ;
+ assert ( fabs( cimags(out[i]) - tImagResult[i] ) / fabs (cimags (out[i])) < 3e-6 ) ;
}
@@ -827,13 +827,13 @@ static void cfftmaTest11 (void )
if ( creals(out[i]) < 1e-14 && tRealResult[i] < 1e-18 )
assert ( 1 ) ;
else
- assert ( fabs( creals(out[i]) - tRealResult[i] ) / fabs (creals (out[i])) < 1e-4 );
+ assert ( fabs( creals(out[i]) - tRealResult[i] ) / fabs (creals (out[i])) < 3e-6 );
if ( cimags(out[i]) < 1e-14 && tImagResult[i] < 1e-18 )
assert ( 1 ) ;
else
- assert ( fabs( cimags(out[i]) - tImagResult[i] ) / fabs (cimags (out[i])) < 1e-4 ) ;
+ assert ( fabs( cimags(out[i]) - tImagResult[i] ) / fabs (cimags (out[i])) < 3e-6 ) ;
}
@@ -884,13 +884,13 @@ static void cfftmaTest12 (void )
if ( creals(out[i]) < 1e-14 && tRealResult[i] < 1e-18 )
assert ( 1 ) ;
else
- assert ( fabs( creals(out[i]) - tRealResult[i] ) / fabs (creals (out[i])) < 1e-4 );
+ assert ( fabs( creals(out[i]) - tRealResult[i] ) / fabs (creals (out[i])) < 3e-6 );
if ( cimags(out[i]) < 1e-14 && tImagResult[i] < 1e-18 )
assert ( 1 ) ;
else
- assert ( fabs( cimags(out[i]) - tImagResult[i] ) / fabs (cimags (out[i])) < 1e-4 ) ;
+ assert ( fabs( cimags(out[i]) - tImagResult[i] ) / fabs (cimags (out[i])) < 3e-6 ) ;
}
@@ -941,13 +941,13 @@ static void cfftmaTest13 (void )
if ( creals(out[i]) < 1e-14 && tRealResult[i] < 1e-18 )
assert ( 1 ) ;
else
- assert ( fabs( creals(out[i]) - tRealResult[i] ) / fabs (creals (out[i])) < 1e-4 );
+ assert ( fabs( creals(out[i]) - tRealResult[i] ) / fabs (creals (out[i])) < 3e-6 );
if ( cimags(out[i]) < 1e-14 && tImagResult[i] < 1e-18 )
assert ( 1 ) ;
else
- assert ( fabs( cimags(out[i]) - tImagResult[i] ) / fabs (cimags (out[i])) < 1e-4 ) ;
+ assert ( fabs( cimags(out[i]) - tImagResult[i] ) / fabs (cimags (out[i])) < 3e-6 ) ;
}
@@ -998,13 +998,13 @@ static void cfftmaTest14 (void )
if ( creals(out[i]) < 1e-14 && tRealResult[i] < 1e-18 )
assert ( 1 ) ;
else
- assert ( fabs( creals(out[i]) - tRealResult[i] ) / fabs (creals (out[i])) < 1e-4 );
+ assert ( fabs( creals(out[i]) - tRealResult[i] ) / fabs (creals (out[i])) < 3e-6 );
if ( cimags(out[i]) < 1e-14 && tImagResult[i] < 1e-18 )
assert ( 1 ) ;
else
- assert ( fabs( cimags(out[i]) - tImagResult[i] ) / fabs (cimags (out[i])) < 1e-4 ) ;
+ assert ( fabs( cimags(out[i]) - tImagResult[i] ) / fabs (cimags (out[i])) < 3e-6 ) ;
}
@@ -1056,13 +1056,13 @@ static void cfftmaTest15 (void )
if ( creals(out[i]) < 1e-14 && tRealResult[i] < 1e-18 )
assert ( 1 ) ;
else
- assert ( fabs( creals(out[i]) - tRealResult[i] ) / fabs (creals (out[i])) < 1e-4 );
+ assert ( fabs( creals(out[i]) - tRealResult[i] ) / fabs (creals (out[i])) < 3e-6 );
if ( cimags(out[i]) < 1e-14 && tImagResult[i] < 1e-18 )
assert ( 1 ) ;
else
- assert ( fabs( cimags(out[i]) - tImagResult[i] ) / fabs (cimags (out[i])) < 1e-4 ) ;
+ assert ( fabs( cimags(out[i]) - tImagResult[i] ) / fabs (cimags (out[i])) < 3e-6 ) ;
}
@@ -1114,13 +1114,13 @@ static void cfftmaTest16 (void )
if ( creals(out[i]) < 1e-14 && tRealResult[i] < 1e-18 )
assert ( 1 ) ;
else
- assert ( fabs( creals(out[i]) - tRealResult[i] ) / fabs (creals (out[i])) < 1e-4 );
+ assert ( fabs( creals(out[i]) - tRealResult[i] ) / fabs (creals (out[i])) < 3e-6 );
if ( cimags(out[i]) < 1e-14 && tImagResult[i] < 1e-18 )
assert ( 1 ) ;
else
- assert ( fabs( cimags(out[i]) - tImagResult[i] ) / fabs (cimags (out[i])) < 1e-4 ) ;
+ assert ( fabs( cimags(out[i]) - tImagResult[i] ) / fabs (cimags (out[i])) < 3e-6 ) ;
}
@@ -1172,13 +1172,13 @@ static void cfftmaTest32 (void )
if ( creals(out[i]) < 1e-14 && tRealResult[i] < 1e-18 )
assert ( 1 ) ;
else
- assert ( fabs( creals(out[i]) - tRealResult[i] ) / fabs (creals (out[i])) < 1e-4 );
+ assert ( fabs( creals(out[i]) - tRealResult[i] ) / fabs (creals (out[i])) < 3e-6 );
if ( cimags(out[i]) < 1e-14 && tImagResult[i] < 1e-18 )
assert ( 1 ) ;
else
- assert ( fabs( cimags(out[i]) - tImagResult[i] ) / fabs (cimags (out[i])) < 1e-4 ) ;
+ assert ( fabs( cimags(out[i]) - tImagResult[i] ) / fabs (cimags (out[i])) < 3e-6 ) ;
}
diff --git a/scilab2c/src/signalProcessing/fft/testMatFft.c b/scilab2c/src/signalProcessing/fft/testMatFft.c
index de626d81..2d071423 100644
--- a/scilab2c/src/signalProcessing/fft/testMatFft.c
+++ b/scilab2c/src/signalProcessing/fft/testMatFft.c
@@ -125,14 +125,14 @@ static void dfftmaTest(void){
printf(" >>> Matrice 1*12 <<< \n");
dfftma(in1, 1, 12, out1);
for (i=0;i<12;i++){
- if (out1[i]>1e-14) assert( (fabs(out1[i]-resR1[i]) / fabs(out1[i])) < 1e-14 );
+ if (out1[i]>1e-16) assert( (fabs(out1[i]-resR1[i]) / fabs(out1[i])) < 3e-16 );
else assert(1);
}
printf(" >>> Matrice 2*6 <<< \n");
dfftma(in2, 2, 6, out2);
for (i=0;i<12;i++){
- if (out2[i]>1e-14) assert( (fabs(out2[i]-resR2[i]) / fabs(out2[i])) < 1e-14 );
+ if (out2[i]>1e-16) assert( (fabs(out2[i]-resR2[i]) / fabs(out2[i])) < 3e-16 );
else assert(1);
}
@@ -140,28 +140,28 @@ static void dfftmaTest(void){
printf(" >>> Matrice 3*4 <<< \n");
dfftma(in3, 3, 4, out3);
for (i=0;i<12;i++){
- if (out3[i]>1e-14) assert( (fabs(out3[i]-resR3[i]) / fabs(out3[i])) < 1e-14 );
+ if (out3[i]>1e-16) assert( (fabs(out3[i]-resR3[i]) / fabs(out3[i])) < 3e-16 );
else assert(1);
}
printf(" >>> Matrice 4*3 <<< \n");
dfftma(in4, 4, 3, out4);
for (i=0;i<12;i++){
- if (out4[i]>1e-14) assert( (fabs(out4[i]-resR4[i]) / fabs(out4[i])) < 1e-14 );
+ if (out4[i]>1e-16) assert( (fabs(out4[i]-resR4[i]) / fabs(out4[i])) < 3e-16 );
else assert(1);
}
printf(" >>> Matrice 6*2 <<< \n");
dfftma(in6, 6, 2, out6);
for (i=0;i<12;i++){
- if (out6[i]>1e-16) assert( (fabs(out6[i]-resR6[i]) / fabs(out6[i])) < 1e-14 );
+ if (out6[i]>1e-16) assert( (fabs(out6[i]-resR6[i]) / fabs(out6[i])) < 3e-16 );
else assert(1);
}
printf(" >>> Matrice 3*3 <<< \n");
dfftma(in9, 3, 3, out9);
for (i=0;i<9;i++){
- if (out9[i]>1e-16) assert( (fabs(out9[i]-resR9[i]) / fabs(out9[i])) < 1e-16 );
+ if (out9[i]>1e-16) assert( (fabs(out9[i]-resR9[i]) / fabs(out9[i])) < 3e-16 );
else assert(1);
}
@@ -222,18 +222,18 @@ static void zfftmaTest(void){
printf(" >>> Matrice 1*12 <<< \n");
zfftma(in1, 1, 12, out1);
for (i=0;i<12;i++){
- if (zreals(out1[i])>1e-14) assert( (fabs(zreals(out1[i])-resR1[i]) / fabs(zreals(out1[i]))) < 1e-14 );
+ if (zreals(out1[i])>1e-16) assert( (fabs(zreals(out1[i])-resR1[i]) / fabs(zreals(out1[i]))) < 3e-16 );
else assert(1);
- if (zimags(out1[i])>1e-14) assert( (fabs(zimags(out1[i])+resI1[i]) / fabs(zimags(out1[i]))) < 1e-14 );
+ if (zimags(out1[i])>1e-16) assert( (fabs(zimags(out1[i])+resI1[i]) / fabs(zimags(out1[i]))) < 3e-16 );
else assert(1);
}
printf(" >>> Matrice 2*6 <<< \n");
zfftma(in2, 2, 6, out2);
for (i=0;i<12;i++){
- if (zreals(out2[i])>1e-14) assert( (fabs(zreals(out2[i])-resR2[i]) / fabs(zreals(out2[i]))) < 1e-14 );
+ if (zreals(out2[i])>1e-16) assert( (fabs(zreals(out2[i])-resR2[i]) / fabs(zreals(out2[i]))) < 3e-16 );
else assert(1);
- if (zimags(out2[i])>1e-14) assert( (fabs(zimags(out2[i])+resI2[i]) / fabs(zimags(out2[i]))) < 1e-13 );
+ if (zimags(out2[i])>1e-16) assert( (fabs(zimags(out2[i])+resI2[i]) / fabs(zimags(out2[i]))) < 3e-13 );
else assert(1);
}
@@ -241,37 +241,37 @@ static void zfftmaTest(void){
printf(" >>> Matrice 3*4 <<< \n");
zfftma(in3, 3, 4, out3);
for (i=0;i<12;i++){
- if (zreals(out3[i])>1e-14) assert( (fabs(zreals(out3[i])-resR3[i]) / fabs(zreals(out3[i]))) < 1e-14 );
+ if (zreals(out3[i])>1e-16) assert( (fabs(zreals(out3[i])-resR3[i]) / fabs(zreals(out3[i]))) < 3e-16 );
else assert(1);
- if (zimags(out3[i])>1e-14) assert( (fabs(zimags(out3[i])+resI3[i]) / fabs(zimags(out3[i]))) < 1e-14 );
+ if (zimags(out3[i])>1e-16) assert( (fabs(zimags(out3[i])+resI3[i]) / fabs(zimags(out3[i]))) < 3e-16 );
else assert(1);
}
printf(" >>> Matrice 4*3 <<< \n");
zfftma(in4, 4, 3, out4);
for (i=0;i<12;i++){
- if (zreals(out4[i])>1e-14) assert( (fabs(zreals(out4[i])-resR4[i]) / fabs(zreals(out4[i]))) < 1e-14 );
+ if (zreals(out4[i])>1e-16) assert( (fabs(zreals(out4[i])-resR4[i]) / fabs(zreals(out4[i]))) < 3e-16 );
else assert(1);
- if (zimags(out4[i])>1e-14) assert( (fabs(zimags(out4[i])+resI4[i]) / fabs(zimags(out4[i]))) < 1e-14 );
+ if (zimags(out4[i])>1e-16) assert( (fabs(zimags(out4[i])+resI4[i]) / fabs(zimags(out4[i]))) < 3e-16 );
else assert(1);
}
printf(" >>> Matrice 6*2 <<< \n");
zfftma(in6, 6, 2, out6);
for (i=0;i<12;i++){
- if (zreals(out6[i])>1e-16) assert( (fabs(zreals(out6[i])-resR6[i]) / fabs(zreals(out6[i]))) < 1e-14 );
+ if (zreals(out6[i])>1e-16) assert( (fabs(zreals(out6[i])-resR6[i]) / fabs(zreals(out6[i]))) < 3e-16 );
else assert(1);
- if (zimags(out6[i])>1e-16) assert( (fabs(zimags(out6[i])+resI6[i]) / fabs(zimags(out6[i]))) < 1e-14 );
+ if (zimags(out6[i])>1e-16) assert( (fabs(zimags(out6[i])+resI6[i]) / fabs(zimags(out6[i]))) < 3e-16 );
else assert(1);
}
printf(" >>> Matrice 3*3 <<< \n");
zfftma(in9, 3, 3, out9);
for (i=0;i<9;i++){
- if (zreals(out9[i])>1e-16) assert( (fabs(zreals(out9[i])-resR9[i]) / fabs(zreals(out9[i]))) < 1e-16 );
+ if (zreals(out9[i])>1e-16) assert( (fabs(zreals(out9[i])-resR9[i]) / fabs(zreals(out9[i]))) < 3e-16 );
else assert(1);
- if (zimags(out9[i])>1e-15) assert( (fabs(zimags(out9[i])-resI9[i]) / fabs(zimags(out9[i]))) < 1e-15 );
+ if (zimags(out9[i])>1e-16) assert( (fabs(zimags(out9[i])-resI9[i]) / fabs(zimags(out9[i]))) < 3e-16 );
else assert(1);
}
}
diff --git a/scilab2c/src/signalProcessing/hilbert/Makefile.am b/scilab2c/src/signalProcessing/hilbert/Makefile.am
index d4bcbde5..fc392a33 100644
--- a/scilab2c/src/signalProcessing/hilbert/Makefile.am
+++ b/scilab2c/src/signalProcessing/hilbert/Makefile.am
@@ -47,6 +47,7 @@ check_LDADD = $(top_builddir)/type/libDoubleComplex.la \
$(top_builddir)/lib/blas/libsciblas.la \
$(top_builddir)/operations/addition/libAddition.la \
$(top_builddir)/operations/subtraction/libSubtraction.la \
+ $(top_builddir)/matrixOperations/zeros/libMatrixZeros.la \
$(top_builddir)/signalProcessing/hilbert/libHilbert.la
diff --git a/scilab2c/src/signalProcessing/hilbert/Makefile.in b/scilab2c/src/signalProcessing/hilbert/Makefile.in
index 9ab83663..f28d43a7 100644
--- a/scilab2c/src/signalProcessing/hilbert/Makefile.in
+++ b/scilab2c/src/signalProcessing/hilbert/Makefile.in
@@ -220,6 +220,7 @@ check_LDADD = $(top_builddir)/type/libDoubleComplex.la \
$(top_builddir)/lib/blas/libsciblas.la \
$(top_builddir)/operations/addition/libAddition.la \
$(top_builddir)/operations/subtraction/libSubtraction.la \
+ $(top_builddir)/matrixOperations/zeros/libMatrixZeros.la \
$(top_builddir)/signalProcessing/hilbert/libHilbert.la
check_INCLUDES = -I $(top_builddir)/type \
diff --git a/scilab2c/src/signalProcessing/hilbert/testHilbert.c b/scilab2c/src/signalProcessing/hilbert/testHilbert.c
index 8a41760d..4743d8f4 100644
--- a/scilab2c/src/signalProcessing/hilbert/testHilbert.c
+++ b/scilab2c/src/signalProcessing/hilbert/testHilbert.c
@@ -390,9 +390,9 @@ static void dhilbertaTest(void){
/* Matrice 3*3 */
printf(">>> Matrice 3*3 <<<\n");
for (i=0;i<9;i++){
- if (zreals(out3[i])>1e-16) assert( (fabs(zreals(out3[i])-resR3[i]) / fabs(zreals(out3[i])) )<1e-15);
+ if (zreals(out3[i])>1e-16) assert( (fabs(zreals(out3[i])-resR3[i]) / fabs(zreals(out3[i])) )<3e-16);
else assert(1);
- if (zimags(out3[i])>1e-16) assert( (fabs(zimags(out3[i])+resI3[i]) / fabs(zimags(out3[i])) )<1e-14);
+ if (zimags(out3[i])>1e-16) assert( (fabs(zimags(out3[i])+resI3[i]) / fabs(zimags(out3[i])) )<3e-16);
else assert(1);
}
@@ -408,18 +408,18 @@ static void dhilbertaTest(void){
/* Matrice 5*5 */
printf(">>> Matrice 5*5 <<<\n");
for (i=0;i<25;i++){
- if (zreals(out5[i])>1e-16) assert( (fabs(zreals(out5[i])-resR5[i]) / fabs(zreals(out5[i])) )<1e-14);
+ if (zreals(out5[i])>1e-16) assert( (fabs(zreals(out5[i])-resR5[i]) / fabs(zreals(out5[i])) )<3e-16);
else assert(1);
- if (zimags(out5[i])>1e-16) assert( (fabs(zimags(out5[i])+resI5[i]) / fabs(zimags(out5[i])) )<1e-13);
+ if (zimags(out5[i])>1e-16) assert( (fabs(zimags(out5[i])+resI5[i]) / fabs(zimags(out5[i])) )<3e-16);
else assert(1);
}
/* Matrice 7*7 */
printf(">>> Matrice 7*7 <<<\n");
for (i=0;i<49;i++){
- if (zreals(out7[i])>1e-16) assert( (fabs(zreals(out7[i])-resR7[i]) / fabs(zreals(out7[i])) )<1e-13);
+ if (zreals(out7[i])>1e-16) assert( (fabs(zreals(out7[i])-resR7[i]) / fabs(zreals(out7[i])) )<3e-16);
else assert(1);
- if (zimags(out7[i])>1e-16) assert( (fabs(zimags(out7[i])+resI7[i]) / fabs(zimags(out7[i])) )<1e-13);
+ if (zimags(out7[i])>1e-16) assert( (fabs(zimags(out7[i])+resI7[i]) / fabs(zimags(out7[i])) )<3e-16);
else assert(1);
}
@@ -435,7 +435,7 @@ static void dhilbertaTest(void){
/* Vecteur 1*3 */
printf(">>> Matrice 1*3 <<<\n");
for (i=0;i<3;i++){
- if (zreals(out13[i])>1e-16) assert( (fabs(zreals(out13[i])-resR13[i]) / fabs(zreals(out13[i])) )<1e-15);
+ if (zreals(out13[i])>1e-16) assert( (fabs(zreals(out13[i])-resR13[i]) / fabs(zreals(out13[i])) )<3e-16);
else assert(1);
if (zimags(out13[i])>1e-16) assert( (fabs(zimags(out13[i])+resI13[i]) / fabs(zimags(out13[i])) )<1e-16);
else assert(1);
@@ -453,25 +453,25 @@ static void dhilbertaTest(void){
/* Vecteur 1*5 */
printf(">>> Matrice 1*5 <<<\n");
for (i=0;i<5;i++){
- if (zreals(out15[i])>1e-16) assert( (fabs(zreals(out15[i])-resR15[i]) / fabs(zreals(out15[i])) )<1e-15);
+ if (zreals(out15[i])>1e-16) assert( (fabs(zreals(out15[i])-resR15[i]) / fabs(zreals(out15[i])) )<3e-16);
else assert(1);
- if (zimags(out15[i])>1e-16) assert( (fabs(zimags(out15[i])+resI15[i]) / fabs(zimags(out15[i])) )<1e-15);
+ if (zimags(out15[i])>1e-16) assert( (fabs(zimags(out15[i])+resI15[i]) / fabs(zimags(out15[i])) )<3e-16);
else assert(1);
}
/* Vecteur 1*7 */
printf(">>> Matrice 1*7 <<<\n");
for (i=0;i<7;i++){
- if (zreals(out17[i])>1e-16) assert( (fabs(zreals(out17[i])-resR17[i]) / fabs(zreals(out17[i])) )<1e-15);
+ if (zreals(out17[i])>1e-16) assert( (fabs(zreals(out17[i])-resR17[i]) / fabs(zreals(out17[i])) )<3e-16);
else assert(1);
- if (zimags(out17[i])>1e-16) assert( (fabs(zimags(out17[i])+resI17[i]) / fabs(zimags(out17[i])) )<1e-15);
+ if (zimags(out17[i])>1e-16) assert( (fabs(zimags(out17[i])+resI17[i]) / fabs(zimags(out17[i])) )<3e-16);
else assert(1);
}
/* Matrices 3*1 */
printf(">>> Matrice 3*1 <<<\n");
for (i=0;i<3;i++){
- if (zreals(out31[i])>1e-16) assert( (fabs(zreals(out31[i])-resR31[i]) / fabs(zreals(out31[i])) )<1e-15);
+ if (zreals(out31[i])>1e-16) assert( (fabs(zreals(out31[i])-resR31[i]) / fabs(zreals(out31[i])) )<3e-16);
else assert(1);
if (zimags(out31[i])>1e-16) assert( (fabs(zimags(out31[i])+resI31[i]) / fabs(zimags(out31[i])) )<1e-16);
else assert(1);
@@ -480,7 +480,7 @@ static void dhilbertaTest(void){
/* Matrices 3*2 */
printf(">>> Matrice 3*2 <<<\n");
for (i=0;i<6;i++){
- if (zreals(out32[i])>1e-16) assert( (fabs(zreals(out32[i])-resR32[i]) / fabs(zreals(out32[i])) )<1e-15);
+ if (zreals(out32[i])>1e-16) assert( (fabs(zreals(out32[i])-resR32[i]) / fabs(zreals(out32[i])) )<3e-16);
else assert(1);
if (zimags(out32[i])>1e-16) assert( (fabs(zimags(out32[i])+resI32[i]) / fabs(zimags(out32[i])) )<1e-16);
else assert(1);
@@ -492,7 +492,7 @@ static void dhilbertaTest(void){
for (i=0;i<12;i++){
if (zreals(out34[i])>1e-16) assert( (fabs(zreals(out34[i])-resR34[i]) / fabs(zreals(out34[i])) )<1e-16);
else assert(1);
- if (zimags(out34[i])>1e-16) assert( (fabs(zimags(out34[i])+resI34[i]) / fabs(zimags(out34[i])) )<1e-15);
+ if (zimags(out34[i])>1e-16) assert( (fabs(zimags(out34[i])+resI34[i]) / fabs(zimags(out34[i])) )<3e-16);
else assert(1);
}
@@ -500,9 +500,9 @@ static void dhilbertaTest(void){
/* Matrices 3*5 */
printf(">>> Matrice 3*5 <<<\n");
for (i=0;i<15;i++){
- if (zreals(out35[i])>1e-16) assert( (fabs(zreals(out35[i])-resR35[i]) / fabs(zreals(out35[i])) )<1e-15);
+ if (zreals(out35[i])>1e-16) assert( (fabs(zreals(out35[i])-resR35[i]) / fabs(zreals(out35[i])) )<3e-16);
else assert(1);
- if (zimags(out35[i])>1e-16) assert( (fabs(zimags(out35[i])+resI35[i]) / fabs(zimags(out35[i])) )<1e-14);
+ if (zimags(out35[i])>1e-16) assert( (fabs(zimags(out35[i])+resI35[i]) / fabs(zimags(out35[i])) )<3e-16);
else assert(1);
}
@@ -510,9 +510,9 @@ static void dhilbertaTest(void){
/* Matrices 3*7 */
printf(">>> Matrice 3*7 <<<\n");
for (i=0;i<21;i++){
- if (zreals(out37[i])>1e-16) assert( (fabs(zreals(out37[i])-resR37[i]) / fabs(zreals(out37[i])) )<1e-13);
+ if (zreals(out37[i])>1e-16) assert( (fabs(zreals(out37[i])-resR37[i]) / fabs(zreals(out37[i])) )<3e-16);
else assert(1);
- if (zimags(out37[i])>1e-16) assert( (fabs(zimags(out37[i])+resI37[i]) / fabs(zimags(out37[i])) )<1e-14);
+ if (zimags(out37[i])>1e-16) assert( (fabs(zimags(out37[i])+resI37[i]) / fabs(zimags(out37[i])) )<3e-16);
else assert(1);
}
@@ -674,7 +674,7 @@ static void shilbertaTest(void){
for (i=0;i<9;i++){
if (creals(out3[i])>1e-16) assert( (fabs(creals(out3[i])-resR3[i]) / fabs(creals(out3[i])) )<1e-6);
else assert(1);
- if (cimags(out3[i])>1e-16) assert( (fabs(cimags(out3[i])+resI3[i]) / fabs(cimags(out3[i])) )<1e-5);
+ if (cimags(out3[i])>1e-16) assert( (fabs(cimags(out3[i])+resI3[i]) / fabs(cimags(out3[i])) )<3e-6);
else assert(1);
}
@@ -692,9 +692,9 @@ static void shilbertaTest(void){
printf(">>> Matrice 5*5 <<<\n");
shilberta(in5, 5, 5, out5);
for (i=0;i<25;i++){
- if (creals(out5[i])>1e-16) assert( (fabs(creals(out5[i])-resR5[i]) / fabs(creals(out5[i])) )<1e-5);
+ if (creals(out5[i])>1e-16) assert( (fabs(creals(out5[i])-resR5[i]) / fabs(creals(out5[i])) )<3e-6);
else assert(1);
- if (cimags(out5[i])>1e-16) assert( (fabs(cimags(out5[i])+resI5[i]) / fabs(cimags(out5[i])) )<1e-5);
+ if (cimags(out5[i])>1e-16) assert( (fabs(cimags(out5[i])+resI5[i]) / fabs(cimags(out5[i])) )<3e-6);
else assert(1);
}
@@ -704,7 +704,7 @@ static void shilbertaTest(void){
for (i=0;i<49;i++){
if (creals(out7[i])>1e-16) assert( (fabs(creals(out7[i])-resR7[i]) / fabs(creals(out7[i])) )<1e-6);
else assert(1);
- if (cimags(out7[i])>1e-16) assert( (fabs(cimags(out7[i])+resI7[i]) / fabs(cimags(out7[i])) )<1e-5);
+ if (cimags(out7[i])>1e-16) assert( (fabs(cimags(out7[i])+resI7[i]) / fabs(cimags(out7[i])) )<3e-6);
else assert(1);
}
@@ -732,7 +732,7 @@ static void shilbertaTest(void){
printf(">>> Matrice 1*4 <<<\n");
shilberta(in14, 1, 4, out14);
for (i=0;i<4;i++){
- if (creals(out14[i])>1e-16) assert( (fabs(creals(out14[i])-resR14[i]) / fabs(creals(out14[i])) )<1e-5);
+ if (creals(out14[i])>1e-16) assert( (fabs(creals(out14[i])-resR14[i]) / fabs(creals(out14[i])) )<3e-6);
else assert(1);
if (cimags(out14[i])>1e-16) assert( (fabs(cimags(out14[i])+resI14[i]) / fabs(cimags(out14[i])) )<1e-6);
else assert(1);
@@ -796,7 +796,7 @@ static void shilbertaTest(void){
for (i=0;i<15;i++){
if (creals(out35[i])>1e-16) assert( (fabs(creals(out35[i])-resR35[i]) / fabs(creals(out35[i])) )<1e-6);
else assert(1);
- if (cimags(out35[i])>1e-16) assert( (fabs(cimags(out35[i])+resI35[i]) / fabs(cimags(out35[i])) )<1e-5);
+ if (cimags(out35[i])>1e-16) assert( (fabs(cimags(out35[i])+resI35[i]) / fabs(cimags(out35[i])) )<3e-6);
else assert(1);
}
@@ -805,9 +805,9 @@ static void shilbertaTest(void){
printf(">>> Matrice 3*7 <<<\n");
shilberta(in37, 3, 7, out37);
for (i=0;i<21;i++){
- if (creals(out37[i])>1e-16) assert( (fabs(creals(out37[i])-resR37[i]) / fabs(creals(out37[i])) )<1e-5);
+ if (creals(out37[i])>1e-16) assert( (fabs(creals(out37[i])-resR37[i]) / fabs(creals(out37[i])) )<3e-6);
else assert(1);
- if (cimags(out37[i])>1e-16) assert( (fabs(cimags(out37[i])+resI37[i]) / fabs(cimags(out37[i])) )<1e-5);
+ if (cimags(out37[i])>1e-16) assert( (fabs(cimags(out37[i])+resI37[i]) / fabs(cimags(out37[i])) )<3e-6);
else assert(1);
}
diff --git a/scilab2c/src/signalProcessing/ifft/testDoubleIfft.c b/scilab2c/src/signalProcessing/ifft/testDoubleIfft.c
index bf188e1e..315e6f58 100644
--- a/scilab2c/src/signalProcessing/ifft/testDoubleIfft.c
+++ b/scilab2c/src/signalProcessing/ifft/testDoubleIfft.c
@@ -386,13 +386,13 @@ static void zifftmaTest2 (void )
if ( zreals(out[i]) < 1e-14 && zreals (Result[i]) < 1e-18 )
assert ( 1 ) ;
else
- assert ( fabs( zreals(out[i]) - zreals (Result[i]) ) / fabs (zreals (out[i])) < 1e-12 );
+ assert ( fabs( zreals(out[i]) - zreals (Result[i]) ) / fabs (zreals (out[i])) < 3e-16 );
if ( zimags(out[i]) < 1e-14 && zimags (Result[i]) < 1e-18 )
assert ( 1 ) ;
else
- assert ( fabs( zimags(out[i]) - zimags (Result[i]) ) / fabs (zimags (out[i])) < 1e-12 ) ;
+ assert ( fabs( zimags(out[i]) - zimags (Result[i]) ) / fabs (zimags (out[i])) < 3e-16 ) ;
}
@@ -441,13 +441,13 @@ static void zifftmaTest3 (void )
if ( zreals(out[i]) < 1e-14 && zreals (Result[i]) < 1e-18 )
assert ( 1 ) ;
else
- assert ( fabs( zreals(out[i]) - zreals (Result[i]) ) / fabs (zreals (out[i])) < 1e-12 );
+ assert ( fabs( zreals(out[i]) - zreals (Result[i]) ) / fabs (zreals (out[i])) < 3e-16 );
if ( zimags(out[i]) < 1e-14 && zimags (Result[i]) < 1e-18 )
assert ( 1 ) ;
else
- assert ( fabs( zimags(out[i]) - zimags (Result[i]) ) / fabs (zimags (out[i])) < 1e-12 ) ;
+ assert ( fabs( zimags(out[i]) - zimags (Result[i]) ) / fabs (zimags (out[i])) < 3e-16 ) ;
}
@@ -491,13 +491,13 @@ static void zifftmaTest4 (void )
if ( zreals(out[i]) < 1e-14 && zreals (Result[i]) < 1e-18 )
assert ( 1 ) ;
else
- assert ( fabs( zreals(out[i]) - zreals (Result[i]) ) / fabs (zreals (out[i])) < 1e-12 );
+ assert ( fabs( zreals(out[i]) - zreals (Result[i]) ) / fabs (zreals (out[i])) < 3e-16 );
if ( zimags(out[i]) < 1e-14 && zimags (Result[i]) < 1e-18 )
assert ( 1 ) ;
else
- assert ( fabs( zimags(out[i]) - zimags (Result[i]) ) / fabs (zimags (out[i])) < 1e-12 ) ;
+ assert ( fabs( zimags(out[i]) - zimags (Result[i]) ) / fabs (zimags (out[i])) < 3e-16 ) ;
*/
}
@@ -548,13 +548,13 @@ static void zifftmaTest5 (void )
if ( zreals(out[i]) < 1e-14 && zreals (Result[i]) < 1e-18 )
assert ( 1 ) ;
else
- assert ( fabs( zreals(out[i]) - zreals (Result[i]) ) / fabs (zreals (out[i])) < 1e-12 );
+ assert ( fabs( zreals(out[i]) - zreals (Result[i]) ) / fabs (zreals (out[i])) < 3e-16 );
if ( zimags(out[i]) < 1e-14 && zimags (Result[i]) < 1e-18 )
assert ( 1 ) ;
else
- assert ( fabs( zimags(out[i]) - zimags (Result[i]) ) / fabs (zimags (out[i])) < 1e-12 ) ;
+ assert ( fabs( zimags(out[i]) - zimags (Result[i]) ) / fabs (zimags (out[i])) < 3e-16 ) ;
}
@@ -605,13 +605,13 @@ static void zifftmaTest6 (void )
if ( zreals(out[i]) < 1e-14 && zreals (Result[i]) < 1e-18 )
assert ( 1 ) ;
else
- assert ( fabs( zreals(out[i]) - zreals (Result[i]) ) / fabs (zreals (out[i])) < 1e-12 );
+ assert ( fabs( zreals(out[i]) - zreals (Result[i]) ) / fabs (zreals (out[i])) < 3e-16 );
if ( zimags(out[i]) < 1e-14 && zimags (Result[i]) < 1e-18 )
assert ( 1 ) ;
else
- assert ( fabs( zimags(out[i]) - zimags (Result[i]) ) / fabs (zimags (out[i])) < 1e-12 ) ;
+ assert ( fabs( zimags(out[i]) - zimags (Result[i]) ) / fabs (zimags (out[i])) < 3e-16 ) ;
}
@@ -662,13 +662,13 @@ static void zifftmaTest7 (void )
if ( zreals(out[i]) < 1e-14 && zreals (Result[i]) < 1e-18 )
assert ( 1 ) ;
else
- assert ( fabs( zreals(out[i]) - zreals (Result[i]) ) / fabs (zreals (out[i])) < 1e-12 );
+ assert ( fabs( zreals(out[i]) - zreals (Result[i]) ) / fabs (zreals (out[i])) < 3e-16 );
if ( zimags(out[i]) < 1e-14 && zimags (Result[i]) < 1e-18 )
assert ( 1 ) ;
else
- assert ( fabs( zimags(out[i]) - zimags (Result[i]) ) / fabs (zimags (out[i])) < 1e-12 ) ;
+ assert ( fabs( zimags(out[i]) - zimags (Result[i]) ) / fabs (zimags (out[i])) < 3e-16 ) ;
}
@@ -711,13 +711,13 @@ static void zifftmaTest8 (void )
if ( zreals(out[i]) < 1e-14 && zreals (Result[i]) < 1e-18 )
assert ( 1 ) ;
else
- assert ( fabs( zreals(out[i]) - zreals (Result[i]) ) / fabs (zreals (out[i])) < 1e-12 );
+ assert ( fabs( zreals(out[i]) - zreals (Result[i]) ) / fabs (zreals (out[i])) < 3e-16 );
if ( zimags(out[i]) < 1e-14 && zimags (Result[i]) < 1e-18 )
assert ( 1 ) ;
else
- assert ( fabs( zimags(out[i]) - zimags (Result[i]) ) / fabs (zimags (out[i])) < 1e-12 ) ;
+ assert ( fabs( zimags(out[i]) - zimags (Result[i]) ) / fabs (zimags (out[i])) < 3e-16 ) ;
*/
}
@@ -761,13 +761,13 @@ static void zifftmaTest9 (void )
if ( zreals(out[i]) < 1e-14 && zreals (Result[i]) < 1e-18 )
assert ( 1 ) ;
else
- assert ( fabs( zreals(out[i]) - zreals (Result[i]) ) / fabs (zreals (out[i])) < 1e-12 );
+ assert ( fabs( zreals(out[i]) - zreals (Result[i]) ) / fabs (zreals (out[i])) < 3e-16 );
if ( zimags(out[i]) < 1e-14 && zimags (Result[i]) < 1e-18 )
assert ( 1 ) ;
else
- assert ( fabs( zimags(out[i]) - zimags (Result[i]) ) / fabs (zimags (out[i])) < 1e-12 ) ;
+ assert ( fabs( zimags(out[i]) - zimags (Result[i]) ) / fabs (zimags (out[i])) < 3e-16 ) ;
}
@@ -820,13 +820,13 @@ static void zifftmaTest10 (void )
if ( zreals(out[i]) < 1e-14 && tRealResult[i] < 1e-18 )
assert ( 1 ) ;
else
- assert ( fabs( zreals(out[i]) - tRealResult[i] ) / fabs (zreals (out[i])) < 1e-12 );
+ assert ( fabs( zreals(out[i]) - tRealResult[i] ) / fabs (zreals (out[i])) < 3e-16 );
if ( zimags(out[i]) < 1e-14 && tImagResult[i] < 1e-18 )
assert ( 1 ) ;
else
- assert ( fabs( zimags(out[i]) - tImagResult[i] ) / fabs (zimags (out[i])) < 1e-12 ) ;
+ assert ( fabs( zimags(out[i]) - tImagResult[i] ) / fabs (zimags (out[i])) < 3e-16 ) ;
}
@@ -877,13 +877,13 @@ static void zifftmaTest11 (void )
if ( zreals(out[i]) < 1e-14 && tRealResult[i] < 1e-18 )
assert ( 1 ) ;
else
- assert ( fabs( zreals(out[i]) - tRealResult[i] ) / fabs (zreals (out[i])) < 1e-12 );
+ assert ( fabs( zreals(out[i]) - tRealResult[i] ) / fabs (zreals (out[i])) < 3e-16 );
if ( zimags(out[i]) < 1e-14 && tImagResult[i] < 1e-18 )
assert ( 1 ) ;
else
- assert ( fabs( zimags(out[i]) - tImagResult[i] ) / fabs (zimags (out[i])) < 1e-12 ) ;
+ assert ( fabs( zimags(out[i]) - tImagResult[i] ) / fabs (zimags (out[i])) < 3e-16 ) ;
}
@@ -935,13 +935,13 @@ static void zifftmaTest12 (void )
if ( zreals(out[i]) < 1e-14 && tRealResult[i] < 1e-18 )
assert ( 1 ) ;
else
- assert ( fabs( zreals(out[i]) - tRealResult[i] ) / fabs (zreals (out[i])) < 1e-12 );
+ assert ( fabs( zreals(out[i]) - tRealResult[i] ) / fabs (zreals (out[i])) < 3e-16 );
if ( zimags(out[i]) < 1e-14 && tImagResult[i] < 1e-18 )
assert ( 1 ) ;
else
- assert ( fabs( zimags(out[i]) - tImagResult[i] ) / fabs (zimags (out[i])) < 1e-12 ) ;
+ assert ( fabs( zimags(out[i]) - tImagResult[i] ) / fabs (zimags (out[i])) < 3e-16 ) ;
}
@@ -993,13 +993,13 @@ static void zifftmaTest13 (void )
if ( zreals(out[i]) < 1e-14 && tRealResult[i] < 1e-18 )
assert ( 1 ) ;
else
- assert ( fabs( zreals(out[i]) - tRealResult[i] ) / fabs (zreals (out[i])) < 1e-12 );
+ assert ( fabs( zreals(out[i]) - tRealResult[i] ) / fabs (zreals (out[i])) < 3e-16 );
if ( zimags(out[i]) < 1e-14 && tImagResult[i] < 1e-18 )
assert ( 1 ) ;
else
- assert ( fabs( zimags(out[i]) - tImagResult[i] ) / fabs (zimags (out[i])) < 1e-12 ) ;
+ assert ( fabs( zimags(out[i]) - tImagResult[i] ) / fabs (zimags (out[i])) < 3e-16 ) ;
}
@@ -1051,13 +1051,13 @@ static void zifftmaTest14 (void )
if ( zreals(out[i]) < 1e-14 && tRealResult[i] < 1e-18 )
assert ( 1 ) ;
else
- assert ( fabs( zreals(out[i]) - tRealResult[i] ) / fabs (zreals (out[i])) < 1e-12 );
+ assert ( fabs( zreals(out[i]) - tRealResult[i] ) / fabs (zreals (out[i])) < 3e-16 );
if ( zimags(out[i]) < 1e-14 && tImagResult[i] < 1e-18 )
assert ( 1 ) ;
else
- assert ( fabs( zimags(out[i]) - tImagResult[i] ) / fabs (zimags (out[i])) < 1e-12 ) ;
+ assert ( fabs( zimags(out[i]) - tImagResult[i] ) / fabs (zimags (out[i])) < 3e-16 ) ;
}
@@ -1110,13 +1110,13 @@ static void zifftmaTest15 (void )
if ( zreals(out[i]) < 1e-14 && tRealResult[i] < 1e-18 )
assert ( 1 ) ;
else
- assert ( fabs( zreals(out[i]) - tRealResult[i] ) / fabs (zreals (out[i])) < 1e-12 );
+ assert ( fabs( zreals(out[i]) - tRealResult[i] ) / fabs (zreals (out[i])) < 3e-16 );
if ( zimags(out[i]) < 1e-14 && tImagResult[i] < 1e-18 )
assert ( 1 ) ;
else
- assert ( fabs( zimags(out[i]) - tImagResult[i] ) / fabs (zimags (out[i])) < 1e-12 ) ;
+ assert ( fabs( zimags(out[i]) - tImagResult[i] ) / fabs (zimags (out[i])) < 3e-16 ) ;
}
@@ -1169,13 +1169,13 @@ static void zifftmaTest16 (void )
if ( zreals(out[i]) < 1e-14 && tRealResult[i] < 1e-18 )
assert ( 1 ) ;
else
- assert ( fabs( zreals(out[i]) - tRealResult[i] ) / fabs (zreals (out[i])) < 1e-12 );
+ assert ( fabs( zreals(out[i]) - tRealResult[i] ) / fabs (zreals (out[i])) < 3e-16 );
if ( zimags(out[i]) < 1e-14 && tImagResult[i] < 1e-18 )
assert ( 1 ) ;
else
- assert ( fabs( zimags(out[i]) - tImagResult[i] ) / fabs (zimags (out[i])) < 1e-12 ) ;
+ assert ( fabs( zimags(out[i]) - tImagResult[i] ) / fabs (zimags (out[i])) < 3e-16 ) ;
}
@@ -1228,13 +1228,13 @@ static void zifftmaTest32 (void )
if ( zreals(out[i]) < 1e-14 && tRealResult[i] < 1e-18 )
assert ( 1 ) ;
else
- assert ( fabs( zreals(out[i]) - tRealResult[i] ) / fabs (zreals (out[i])) < 1e-12 );
+ assert ( fabs( zreals(out[i]) - tRealResult[i] ) / fabs (zreals (out[i])) < 3e-16 );
if ( zimags(out[i]) < 1e-14 && tImagResult[i] < 1e-18 )
assert ( 1 ) ;
else
- assert ( fabs( zimags(out[i]) - tImagResult[i] ) / fabs (zimags (out[i])) < 1e-12 ) ;
+ assert ( fabs( zimags(out[i]) - tImagResult[i] ) / fabs (zimags (out[i])) < 3e-16 ) ;
}
diff --git a/scilab2c/src/signalProcessing/ifft/testFloatIfft.c b/scilab2c/src/signalProcessing/ifft/testFloatIfft.c
index 4dc0f442..e00d5432 100644
--- a/scilab2c/src/signalProcessing/ifft/testFloatIfft.c
+++ b/scilab2c/src/signalProcessing/ifft/testFloatIfft.c
@@ -383,13 +383,13 @@ static void cifftmaTest2 (void )
if ( creals(out[i]) < 1e-14 && creals (Result[i]) < 1e-18 )
assert ( 1 ) ;
else
- assert ( fabs( creals(out[i]) - creals (Result[i]) ) / fabs (creals (out[i])) < 1e-4 );
+ assert ( fabs( creals(out[i]) - creals (Result[i]) ) / fabs (creals (out[i])) < 3e-6 );
if ( cimags(out[i]) < 1e-14 && cimags (Result[i]) < 1e-18 )
assert ( 1 ) ;
else
- assert ( fabs( cimags(out[i]) - cimags (Result[i]) ) / fabs (cimags (out[i])) < 1e-4 ) ;
+ assert ( fabs( cimags(out[i]) - cimags (Result[i]) ) / fabs (cimags (out[i])) < 3e-6 ) ;
}
@@ -434,18 +434,16 @@ static void cifftmaTest3 (void )
cimags (Result[i]),
fabs( creals(out[i]) - creals (Result[i]) ) / fabs (creals (out[i])) ,
fabs( cimags(out[i]) - cimags (Result[i]) ) / fabs (cimags (out[i])));
-/*
if ( creals(out[i]) < 1e-14 && creals (Result[i]) < 1e-18 )
assert ( 1 ) ;
else
- assert ( fabs( creals(out[i]) - creals (Result[i]) ) / fabs (creals (out[i])) < 1e-4 );
+ assert ( fabs( creals(out[i]) - creals (Result[i]) ) / fabs (creals (out[i])) < 3e-6 );
if ( cimags(out[i]) < 1e-14 && cimags (Result[i]) < 1e-18 )
assert ( 1 ) ;
else
- assert ( fabs( cimags(out[i]) - cimags (Result[i]) ) / fabs (cimags (out[i])) < 1e-4 ) ;
-*/
+ assert ( fabs( cimags(out[i]) - cimags (Result[i]) ) / fabs (cimags (out[i])) < 3e-6 ) ;
}
free(out);
free(in);
@@ -482,18 +480,16 @@ static void cifftmaTest4 (void )
i ,creals(out[i]) , cimags(out[i]), creals (Result[i]) , cimags (Result[i]),
fabs( creals(out[i]) - creals (Result[i]) ) / fabs (creals (out[i])) ,
fabs( cimags(out[i]) - cimags (Result[i]) ) / fabs (cimags (out[i])));
-/*
if ( creals(out[i]) < 1e-14 && creals (Result[i]) < 1e-18 )
assert ( 1 ) ;
else
- assert ( fabs( creals(out[i]) - creals (Result[i]) ) / fabs (creals (out[i])) < 1e-4 );
+ assert ( fabs( creals(out[i]) - creals (Result[i]) ) / fabs (creals (out[i])) < 3e-6 );
if ( cimags(out[i]) < 1e-14 && cimags (Result[i]) < 1e-18 )
assert ( 1 ) ;
else
- assert ( fabs( cimags(out[i]) - cimags (Result[i]) ) / fabs (cimags (out[i])) < 1e-4 ) ;
-*/
+ assert ( fabs( cimags(out[i]) - cimags (Result[i]) ) / fabs (cimags (out[i])) < 3e-6 ) ;
}
free(out);
free(in);
@@ -541,13 +537,13 @@ static void cifftmaTest5 (void )
if ( creals(out[i]) < 1e-14 && creals (Result[i]) < 1e-18 )
assert ( 1 ) ;
else
- assert ( fabs( creals(out[i]) - creals (Result[i]) ) / fabs (creals (out[i])) < 1e-4 );
+ assert ( fabs( creals(out[i]) - creals (Result[i]) ) / fabs (creals (out[i])) < 3e-6 );
if ( cimags(out[i]) < 1e-14 && cimags (Result[i]) < 1e-18 )
assert ( 1 ) ;
else
- assert ( fabs( cimags(out[i]) - cimags (Result[i]) ) / fabs (cimags (out[i])) < 1e-4 ) ;
+ assert ( fabs( cimags(out[i]) - cimags (Result[i]) ) / fabs (cimags (out[i])) < 3e-6 ) ;
}
free(out);
@@ -596,13 +592,13 @@ static void cifftmaTest6 (void )
if ( creals(out[i]) < 1e-14 && creals (Result[i]) < 1e-18 )
assert ( 1 ) ;
else
- assert ( fabs( creals(out[i]) - creals (Result[i]) ) / fabs (creals (out[i])) < 1e-4 );
+ assert ( fabs( creals(out[i]) - creals (Result[i]) ) / fabs (creals (out[i])) < 3e-6 );
if ( cimags(out[i]) < 1e-14 && cimags (Result[i]) < 1e-18 )
assert ( 1 ) ;
else
- assert ( fabs( cimags(out[i]) - cimags (Result[i]) ) / fabs (cimags (out[i])) < 1e-4 ) ;
+ assert ( fabs( cimags(out[i]) - cimags (Result[i]) ) / fabs (cimags (out[i])) < 3e-6 ) ;
}
free(out);
@@ -651,13 +647,13 @@ static void cifftmaTest7 (void )
if ( creals(out[i]) < 1e-14 && creals (Result[i]) < 1e-18 )
assert ( 1 ) ;
else
- assert ( fabs( creals(out[i]) - creals (Result[i]) ) / fabs (creals (out[i])) < 1e-4 );
+ assert ( fabs( creals(out[i]) - creals (Result[i]) ) / fabs (creals (out[i])) < 3e-6 );
if ( cimags(out[i]) < 1e-14 && cimags (Result[i]) < 1e-18 )
assert ( 1 ) ;
else
- assert ( fabs( cimags(out[i]) - cimags (Result[i]) ) / fabs (cimags (out[i])) < 1e-4 ) ;
+ assert ( fabs( cimags(out[i]) - cimags (Result[i]) ) / fabs (cimags (out[i])) < 3e-6 ) ;
}
free(out);
@@ -698,13 +694,13 @@ static void cifftmaTest8 (void )
if ( creals(out[i]) < 1e-14 && creals (Result[i]) < 1e-18 )
assert ( 1 ) ;
else
- assert ( fabs( creals(out[i]) - creals (Result[i]) ) / fabs (creals (out[i])) < 1e-4 );
+ assert ( fabs( creals(out[i]) - creals (Result[i]) ) / fabs (creals (out[i])) < 3e-6 );
if ( cimags(out[i]) < 1e-14 && cimags (Result[i]) < 1e-18 )
assert ( 1 ) ;
else
- assert ( fabs( cimags(out[i]) - cimags (Result[i]) ) / fabs (cimags (out[i])) < 1e-4 ) ;
+ assert ( fabs( cimags(out[i]) - cimags (Result[i]) ) / fabs (cimags (out[i])) < 3e-6 ) ;
}
free(out);
@@ -746,13 +742,13 @@ static void cifftmaTest9 (void )
if ( creals(out[i]) < 1e-14 && creals (Result[i]) < 1e-18 )
assert ( 1 ) ;
else
- assert ( fabs( creals(out[i]) - creals (Result[i]) ) / fabs (creals (out[i])) < 1e-4 );
+ assert ( fabs( creals(out[i]) - creals (Result[i]) ) / fabs (creals (out[i])) < 3e-6 );
if ( cimags(out[i]) < 1e-14 && cimags (Result[i]) < 1e-18 )
assert ( 1 ) ;
else
- assert ( fabs( cimags(out[i]) - cimags (Result[i]) ) / fabs (cimags (out[i])) < 1e-4 ) ;
+ assert ( fabs( cimags(out[i]) - cimags (Result[i]) ) / fabs (cimags (out[i])) < 3e-6 ) ;
}
free(out);
@@ -803,13 +799,13 @@ static void cifftmaTest10 (void )
if ( creals(out[i]) < 1e-14 && tRealResult[i] < 1e-18 )
assert ( 1 ) ;
else
- assert ( fabs( creals(out[i]) - tRealResult[i] ) / fabs (creals (out[i])) < 1e-4 );
+ assert ( fabs( creals(out[i]) - tRealResult[i] ) / fabs (creals (out[i])) < 3e-6 );
if ( cimags(out[i]) < 1e-14 && tImagResult[i] < 1e-18 )
assert ( 1 ) ;
else
- assert ( fabs( cimags(out[i]) - tImagResult[i] ) / fabs (cimags (out[i])) < 1e-4 ) ;
+ assert ( fabs( cimags(out[i]) - tImagResult[i] ) / fabs (cimags (out[i])) < 3e-6 ) ;
}
free(out);
@@ -858,13 +854,13 @@ static void cifftmaTest11 (void )
if ( creals(out[i]) < 1e-14 && tRealResult[i] < 1e-18 )
assert ( 1 ) ;
else
- assert ( fabs( creals(out[i]) - tRealResult[i] ) / fabs (creals (out[i])) < 1e-4 );
+ assert ( fabs( creals(out[i]) - tRealResult[i] ) / fabs (creals (out[i])) < 3e-6 );
if ( cimags(out[i]) < 1e-14 && tImagResult[i] < 1e-18 )
assert ( 1 ) ;
else
- assert ( fabs( cimags(out[i]) - tImagResult[i] ) / fabs (cimags (out[i])) < 1e-4 ) ;
+ assert ( fabs( cimags(out[i]) - tImagResult[i] ) / fabs (cimags (out[i])) < 3e-6 ) ;
}
free(out);
@@ -915,13 +911,13 @@ static void cifftmaTest12 (void )
if ( creals(out[i]) < 1e-14 && tRealResult[i] < 1e-18 )
assert ( 1 ) ;
else
- assert ( fabs( creals(out[i]) - tRealResult[i] ) / fabs (creals (out[i])) < 1e-4 );
+ assert ( fabs( creals(out[i]) - tRealResult[i] ) / fabs (creals (out[i])) < 3e-6 );
if ( cimags(out[i]) < 1e-14 && tImagResult[i] < 1e-18 )
assert ( 1 ) ;
else
- assert ( fabs( cimags(out[i]) - tImagResult[i] ) / fabs (cimags (out[i])) < 1e-4 ) ;
+ assert ( fabs( cimags(out[i]) - tImagResult[i] ) / fabs (cimags (out[i])) < 3e-6 ) ;
}
free(out);
@@ -972,13 +968,13 @@ static void cifftmaTest13 (void )
if ( creals(out[i]) < 1e-14 && tRealResult[i] < 1e-18 )
assert ( 1 ) ;
else
- assert ( fabs( creals(out[i]) - tRealResult[i] ) / fabs (creals (out[i])) < 1e-4 );
+ assert ( fabs( creals(out[i]) - tRealResult[i] ) / fabs (creals (out[i])) < 3e-6 );
if ( cimags(out[i]) < 1e-14 && tImagResult[i] < 1e-18 )
assert ( 1 ) ;
else
- assert ( fabs( cimags(out[i]) - tImagResult[i] ) / fabs (cimags (out[i])) < 1e-4 ) ;
+ assert ( fabs( cimags(out[i]) - tImagResult[i] ) / fabs (cimags (out[i])) < 3e-6 ) ;
}
free(out);
@@ -1029,13 +1025,13 @@ static void cifftmaTest14 (void )
if ( creals(out[i]) < 1e-14 && tRealResult[i] < 1e-18 )
assert ( 1 ) ;
else
- assert ( fabs( creals(out[i]) - tRealResult[i] ) / fabs (creals (out[i])) < 1e-4 );
+ assert ( fabs( creals(out[i]) - tRealResult[i] ) / fabs (creals (out[i])) < 3e-6 );
if ( cimags(out[i]) < 1e-14 && tImagResult[i] < 1e-18 )
assert ( 1 ) ;
else
- assert ( fabs( cimags(out[i]) - tImagResult[i] ) / fabs (cimags (out[i])) < 1e-4 ) ;
+ assert ( fabs( cimags(out[i]) - tImagResult[i] ) / fabs (cimags (out[i])) < 3e-6 ) ;
}
free(out);
@@ -1087,13 +1083,13 @@ static void cifftmaTest15 (void )
if ( creals(out[i]) < 1e-14 && tRealResult[i] < 1e-18 )
assert ( 1 ) ;
else
- assert ( fabs( creals(out[i]) - tRealResult[i] ) / fabs (creals (out[i])) < 1e-4 );
+ assert ( fabs( creals(out[i]) - tRealResult[i] ) / fabs (creals (out[i])) < 3e-6 );
if ( cimags(out[i]) < 1e-14 && tImagResult[i] < 1e-18 )
assert ( 1 ) ;
else
- assert ( fabs( cimags(out[i]) - tImagResult[i] ) / fabs (cimags (out[i])) < 1e-4 ) ;
+ assert ( fabs( cimags(out[i]) - tImagResult[i] ) / fabs (cimags (out[i])) < 3e-6 ) ;
}
free(out);
@@ -1145,13 +1141,13 @@ static void cifftmaTest16 (void )
if ( creals(out[i]) < 1e-14 && tRealResult[i] < 1e-18 )
assert ( 1 ) ;
else
- assert ( fabs( creals(out[i]) - tRealResult[i] ) / fabs (creals (out[i])) < 1e-4 );
+ assert ( fabs( creals(out[i]) - tRealResult[i] ) / fabs (creals (out[i])) < 3e-6 );
if ( cimags(out[i]) < 1e-14 && tImagResult[i] < 1e-18 )
assert ( 1 ) ;
else
- assert ( fabs( cimags(out[i]) - tImagResult[i] ) / fabs (cimags (out[i])) < 1e-4 ) ;
+ assert ( fabs( cimags(out[i]) - tImagResult[i] ) / fabs (cimags (out[i])) < 3e-6 ) ;
}
free(out);
@@ -1203,13 +1199,13 @@ static void cifftmaTest32 (void )
if ( creals(out[i]) < 1e-14 && tRealResult[i] < 1e-18 )
assert ( 1 ) ;
else
- assert ( fabs( creals(out[i]) - tRealResult[i] ) / fabs (creals (out[i])) < 1e-4 );
+ assert ( fabs( creals(out[i]) - tRealResult[i] ) / fabs (creals (out[i])) < 3e-6 );
if ( cimags(out[i]) < 1e-14 && tImagResult[i] < 1e-18 )
assert ( 1 ) ;
else
- assert ( fabs( cimags(out[i]) - tImagResult[i] ) / fabs (cimags (out[i])) < 1e-4 ) ;
+ assert ( fabs( cimags(out[i]) - tImagResult[i] ) / fabs (cimags (out[i])) < 3e-6 ) ;
}
free(out);
diff --git a/scilab2c/src/signalProcessing/ifft/testMatIfft.c b/scilab2c/src/signalProcessing/ifft/testMatIfft.c
index 88de15e5..33aee9be 100644
--- a/scilab2c/src/signalProcessing/ifft/testMatIfft.c
+++ b/scilab2c/src/signalProcessing/ifft/testMatIfft.c
@@ -130,14 +130,14 @@ static void difftmaTest(void){
printf(" >>> Matrice 1*12 <<< \n");
difftma(in1, 1, 12, out1);
for (i=0;i<12;i++){
- if (out1[i]>1e-14) assert( (fabs(out1[i]-resR1[i]) / fabs(out1[i])) < 1e-14 );
+ if (out1[i]>1e-16) assert( (fabs(out1[i]-resR1[i]) / fabs(out1[i])) < 3e-16 );
else assert(1);
}
printf(" >>> Matrice 2*6 <<< \n");
difftma(in2, 2, 6, out2);
for (i=0;i<12;i++){
- if (out2[i]>1e-14) assert( (fabs(out2[i]-resR2[i]) / fabs(out2[i])) < 1e-14 );
+ if (out2[i]>1e-16) assert( (fabs(out2[i]-resR2[i]) / fabs(out2[i])) < 3e-16 );
else assert(1);
}
@@ -145,28 +145,28 @@ static void difftmaTest(void){
printf(" >>> Matrice 3*4 <<< \n");
difftma(in3, 3, 4, out3);
for (i=0;i<12;i++){
- if (out3[i]>1e-14) assert( (fabs(out3[i]-resR3[i]) / fabs(out3[i])) < 1e-14 );
+ if (out3[i]>1e-16) assert( (fabs(out3[i]-resR3[i]) / fabs(out3[i])) < 3e-16 );
else assert(1);
}
printf(" >>> Matrice 4*3 <<< \n");
difftma(in4, 4, 3, out4);
for (i=0;i<12;i++){
- if (out4[i]>1e-14) assert( (fabs(out4[i]-resR4[i]) / fabs(out4[i])) < 1e-14 );
+ if (out4[i]>1e-16) assert( (fabs(out4[i]-resR4[i]) / fabs(out4[i])) < 3e-16 );
else assert(1);
}
printf(" >>> Matrice 6*2 <<< \n");
difftma(in6, 6, 2, out6);
for (i=0;i<12;i++){
- if (out6[i]>1e-16) assert( (fabs(out6[i]-resR6[i]) / fabs(out6[i])) < 1e-14 );
+ if (out6[i]>1e-16) assert( (fabs(out6[i]-resR6[i]) / fabs(out6[i])) < 3e-16 );
else assert(1);
}
printf(" >>> Matrice 3*3 <<< \n");
difftma(in9, 3, 3, out9);
for (i=0;i<9;i++){
- if (out9[i]>1e-16) assert( (fabs(out9[i]-resR9[i]) / fabs(out9[i])) < 1e-16 );
+ if (out9[i]>1e-16) assert( (fabs(out9[i]-resR9[i]) / fabs(out9[i])) < 3e-16 );
else assert(1);
}
@@ -227,18 +227,18 @@ static void zifftmaTest(void){
printf(" >>> Matrice 1*12 <<< \n");
zifftma(in1, 1, 12, out1);
for (i=0;i<12;i++){
- if (zreals(out1[i])>1e-14) assert( (fabs(zreals(out1[i])-resR1[i]) / fabs(zreals(out1[i]))) < 1e-14 );
+ if (zreals(out1[i])>1e-16) assert( (fabs(zreals(out1[i])-resR1[i]) / fabs(zreals(out1[i]))) < 3e-16 );
else assert(1);
- if (zimags(out1[i])>1e-14) assert( (fabs(zimags(out1[i])+resI1[i]) / fabs(zimags(out1[i]))) < 1e-14 );
+ if (zimags(out1[i])>1e-16) assert( (fabs(zimags(out1[i])+resI1[i]) / fabs(zimags(out1[i]))) < 3e-16 );
else assert(1);
}
printf(" >>> Matrice 2*6 <<< \n");
zifftma(in2, 2, 6, out2);
for (i=0;i<12;i++){
- if (zreals(out2[i])>1e-14) assert( (fabs(zreals(out2[i])-resR2[i]) / fabs(zreals(out2[i]))) < 1e-14 );
+ if (zreals(out2[i])>1e-16) assert( (fabs(zreals(out2[i])-resR2[i]) / fabs(zreals(out2[i]))) < 3e-16 );
else assert(1);
- if (zimags(out2[i])>1e-14) assert( (fabs(zimags(out2[i])+resI2[i]) / fabs(zimags(out2[i]))) < 1e-13 );
+ if (zimags(out2[i])>1e-16) assert( (fabs(zimags(out2[i])+resI2[i]) / fabs(zimags(out2[i]))) < 3e-13 );
else assert(1);
}
@@ -246,37 +246,37 @@ static void zifftmaTest(void){
printf(" >>> Matrice 3*4 <<< \n");
zifftma(in3, 3, 4, out3);
for (i=0;i<12;i++){
- if (zreals(out3[i])>1e-14) assert( (fabs(zreals(out3[i])-resR3[i]) / fabs(zreals(out3[i]))) < 1e-14 );
+ if (zreals(out3[i])>1e-16) assert( (fabs(zreals(out3[i])-resR3[i]) / fabs(zreals(out3[i]))) < 3e-16 );
else assert(1);
- if (zimags(out3[i])>1e-14) assert( (fabs(zimags(out3[i])+resI3[i]) / fabs(zimags(out3[i]))) < 1e-14 );
+ if (zimags(out3[i])>1e-16) assert( (fabs(zimags(out3[i])+resI3[i]) / fabs(zimags(out3[i]))) < 3e-16 );
else assert(1);
}
printf(" >>> Matrice 4*3 <<< \n");
zifftma(in4, 4, 3, out4);
for (i=0;i<12;i++){
- if (zreals(out4[i])>1e-14) assert( (fabs(zreals(out4[i])-resR4[i]) / fabs(zreals(out4[i]))) < 1e-14 );
+ if (zreals(out4[i])>1e-16) assert( (fabs(zreals(out4[i])-resR4[i]) / fabs(zreals(out4[i]))) < 3e-16 );
else assert(1);
- if (zimags(out4[i])>1e-14) assert( (fabs(zimags(out4[i])+resI4[i]) / fabs(zimags(out4[i]))) < 1e-14 );
+ if (zimags(out4[i])>1e-16) assert( (fabs(zimags(out4[i])+resI4[i]) / fabs(zimags(out4[i]))) < 3e-16 );
else assert(1);
}
printf(" >>> Matrice 6*2 <<< \n");
zifftma(in6, 6, 2, out6);
for (i=0;i<12;i++){
- if (zreals(out6[i])>1e-16) assert( (fabs(zreals(out6[i])-resR6[i]) / fabs(zreals(out6[i]))) < 1e-14 );
+ if (zreals(out6[i])>1e-16) assert( (fabs(zreals(out6[i])-resR6[i]) / fabs(zreals(out6[i]))) < 3e-16 );
else assert(1);
- if (zimags(out6[i])>1e-16) assert( (fabs(zimags(out6[i])+resI6[i]) / fabs(zimags(out6[i]))) < 1e-14 );
+ if (zimags(out6[i])>1e-16) assert( (fabs(zimags(out6[i])+resI6[i]) / fabs(zimags(out6[i]))) < 3e-16 );
else assert(1);
}
printf(" >>> Matrice 3*3 <<< \n");
zifftma(in9, 3, 3, out9);
for (i=0;i<9;i++){
- if (zreals(out9[i])>1e-16) assert( (fabs(zreals(out9[i])-resR9[i]) / fabs(zreals(out9[i]))) < 1e-16 );
+ if (zreals(out9[i])>1e-16) assert( (fabs(zreals(out9[i])-resR9[i]) / fabs(zreals(out9[i]))) < 3e-16 );
else assert(1);
- if (zimags(out9[i])>1e-15) assert( (fabs(zimags(out9[i])-resI9[i]) / fabs(zimags(out9[i]))) < 1e-15 );
+ if (zimags(out9[i])>1e-16) assert( (fabs(zimags(out9[i])-resI9[i]) / fabs(zimags(out9[i]))) < 3e-16 );
else assert(1);
}
}
diff --git a/scilab2c/src/signalProcessing/lev/testDoubleLev.c b/scilab2c/src/signalProcessing/lev/testDoubleLev.c
index d9d4b2f5..6967890e 100644
--- a/scilab2c/src/signalProcessing/lev/testDoubleLev.c
+++ b/scilab2c/src/signalProcessing/lev/testDoubleLev.c
@@ -33,7 +33,7 @@ static void dlevaTest(void) {
;
for (i=0;i<3;i++) {
- if (out1[i]>1e-16) assert((fabs(out1[i]-result1[i]) / fabs (out1[i]))<1e-15);
+ if (out1[i]>1e-16) assert((fabs(out1[i]-result1[i]) / fabs (out1[i]))<3e-16);
else assert(1);
}
@@ -75,11 +75,11 @@ static void dlevaTest(void) {
else assert(1);
}
- if (out2>1e-16) assert((fabs(out2-result2) / fabs (out2))<1e-15);
+ if (out2>1e-16) assert((fabs(out2-result2) / fabs (out2))<3e-16);
for (i=0;i<7;i++) {
- if (out3[i]>1e-16) assert((fabs(out3[i]-result3[i]) / fabs (out3[i]))<1e-14);
+ if (out3[i]>1e-16) assert((fabs(out3[i]-result3[i]) / fabs (out3[i]))<3e-16);
else assert(1);
}
@@ -110,19 +110,19 @@ static void zlevaTest(void) {
out2 = zleva(in,4,out1,out3);
for (i=0;i<3;i++){
- if (zreals(out1[i])>1e-16) assert((fabs(zreals(out1[i])-result1R[i]) / fabs(zreals(out1[i]))) <1e-15);
+ if (zreals(out1[i])>1e-16) assert((fabs(zreals(out1[i])-result1R[i]) / fabs(zreals(out1[i]))) <3e-16);
else assert(1);
if (zimags(out1[i])>1e-16) assert((fabs(zimags(out1[i])-result1I[i]) / fabs(zimags(out1[i]))) <1e-16);
else assert(1);
}
- if (zreals(out2)>1e-16) assert((fabs(zreals(out2)-result2R) / fabs(zreals(out2))) <1e-15);
+ if (zreals(out2)>1e-16) assert((fabs(zreals(out2)-result2R) / fabs(zreals(out2))) <3e-16);
else assert(1);
- if (zimags(out2)>1e-16) assert((fabs(zimags(out2)-result2I) / fabs(zimags(out2))) <1e-15);
+ if (zimags(out2)>1e-16) assert((fabs(zimags(out2)-result2I) / fabs(zimags(out2))) <3e-16);
else assert(1);
for (i=0;i<3;i++){
- if (zreals(out3[i])>1e-16) assert((fabs(zreals(out3[i])-result3R[i]) / fabs(zreals(out3[i]))) <1e-15);
+ if (zreals(out3[i])>1e-16) assert((fabs(zreals(out3[i])-result3R[i]) / fabs(zreals(out3[i]))) <3e-16);
else assert(1);
if (zimags(out3[i])>1e-16) assert((fabs(zimags(out3[i])-result3I[i]) / fabs(zimags(out3[i]))) <1e-16);
else assert(1);
@@ -162,21 +162,21 @@ static void zlevaTest(void) {
for (i=0;i<5;i++) printf("out : %1.20f+%1.20f\n",zreals(out1[i]),zimags(out1[i]));
for (i=0;i<5;i++){
- if (zreals(out1[i])>1e-16) assert((fabs(zreals(out1[i])-result1R[i]) / fabs(zreals(out1[i]))) <1e-14);
+ if (zreals(out1[i])>1e-16) assert((fabs(zreals(out1[i])-result1R[i]) / fabs(zreals(out1[i]))) <3e-16);
else assert(1);
- if (zimags(out1[i])>1e-16) assert((fabs(zimags(out1[i])-result1I[i]) / fabs(zimags(out1[i]))) <1e-14);
+ if (zimags(out1[i])>1e-16) assert((fabs(zimags(out1[i])-result1I[i]) / fabs(zimags(out1[i]))) <3e-16);
else assert(1);
}
- if (zreals(out2)>1e-16) assert((fabs(zreals(out2)-result2R) / fabs(zreals(out2))) <1e-14);
+ if (zreals(out2)>1e-16) assert((fabs(zreals(out2)-result2R) / fabs(zreals(out2))) <3e-16);
else assert(1);
- if (zimags(out2)>1e-16) assert((fabs(zimags(out2)-result2I) / fabs(zimags(out2))) <1e-14);
+ if (zimags(out2)>1e-16) assert((fabs(zimags(out2)-result2I) / fabs(zimags(out2))) <3e-16);
else assert(1);
for (i=0;i<5;i++){
- if (zreals(out3[i])>1e-16) assert((fabs(zreals(out3[i])-result3R[i]) / fabs(zreals(out3[i]))) <1e-15);
+ if (zreals(out3[i])>1e-16) assert((fabs(zreals(out3[i])-result3R[i]) / fabs(zreals(out3[i]))) <3e-16);
else assert(1);
- if (zimags(out3[i])>1e-16) assert((fabs(zimags(out3[i])-result3I[i]) / fabs(zimags(out3[i]))) <1e-14);
+ if (zimags(out3[i])>1e-16) assert((fabs(zimags(out3[i])-result3I[i]) / fabs(zimags(out3[i]))) <3e-16);
else assert(1);
}
}
diff --git a/scilab2c/src/signalProcessing/lev/testFloatLev.c b/scilab2c/src/signalProcessing/lev/testFloatLev.c
index 7ce9c1ed..2c11a47b 100644
--- a/scilab2c/src/signalProcessing/lev/testFloatLev.c
+++ b/scilab2c/src/signalProcessing/lev/testFloatLev.c
@@ -71,7 +71,7 @@ static void slevaTest(void) {
out2 = sleva(in,8,out1,out3);
/*FIXME : Assert à 10^-4*/
for (i=0;i<7;i++) {
- if (out1[i]>1e-6) assert((fabs(out1[i]-result1[i]) / fabs (out1[i]))<1e-4);
+ if (out1[i]>1e-6) assert((fabs(out1[i]-result1[i]) / fabs (out1[i]))<3e-6);
else assert(1);
}
diff --git a/scilab2c/src/signalProcessing/levin/testDoubleLevin.c b/scilab2c/src/signalProcessing/levin/testDoubleLevin.c
index d2e0b227..273d5bd8 100644
--- a/scilab2c/src/signalProcessing/levin/testDoubleLevin.c
+++ b/scilab2c/src/signalProcessing/levin/testDoubleLevin.c
@@ -67,14 +67,14 @@ static void dlevinaTest(void) {
for (i=0;i<48;i++){
if (la[i]!=0)
- assert( (fabs(la[i]-result_la[i]) / fabs(la[i]) ) <1e-14);
+ assert( (fabs(la[i]-result_la[i]) / fabs(la[i]) ) <3e-16);
else
assert( fabs(la[i]-result_la[i]) == 0);
}
for (i=0;i<12;i++){
if (sig[i]!=0)
- assert( (fabs(sig[i]-result_sig[i]) / fabs(sig[i]) ) <1e-14);
+ assert( (fabs(sig[i]-result_sig[i]) / fabs(sig[i]) ) <3e-16);
else
assert( fabs(sig[i]-result_sig[i]) == 0);
}
@@ -82,7 +82,7 @@ static void dlevinaTest(void) {
for (i=0;i<48;i++){
if (lb[i]!=0)
- assert( (fabs(lb[i]-result_lb[i]) / fabs(lb[i]) ) <1e-13);
+ assert( (fabs(lb[i]-result_lb[i]) / fabs(lb[i]) ) <3e-16);
else
assert( fabs(lb[i]-result_lb[i]) == 0);
}
diff --git a/scilab2c/src/signalProcessing/levin/testFloatLevin.c b/scilab2c/src/signalProcessing/levin/testFloatLevin.c
index a7924cec..eec4ba99 100644
--- a/scilab2c/src/signalProcessing/levin/testFloatLevin.c
+++ b/scilab2c/src/signalProcessing/levin/testFloatLevin.c
@@ -67,14 +67,14 @@ static void dlevinaTest(void) {
for (i=0;i<48;i++){
if (la[i]!=0)
- assert( (fabs(la[i]-result_la[i]) / fabs(la[i]) ) <1e-5);
+ assert( (fabs(la[i]-result_la[i]) / fabs(la[i]) ) <3e-6);
else
assert( fabs(la[i]-result_la[i]) == 0);
}
for (i=0;i<12;i++){
if (sig[i]!=0)
- assert( (fabs(sig[i]-result_sig[i]) / fabs(sig[i]) ) <1e-5);
+ assert( (fabs(sig[i]-result_sig[i]) / fabs(sig[i]) ) <3e-6);
else
assert( fabs(sig[i]-result_sig[i]) == 0);
}
@@ -82,7 +82,7 @@ static void dlevinaTest(void) {
for (i=0;i<48;i++){
if (lb[i]!=0)
- assert( (fabs(lb[i]-result_lb[i]) / fabs(lb[i]) ) <1e-5);
+ assert( (fabs(lb[i]-result_lb[i]) / fabs(lb[i]) ) <3e-6);
else
assert( fabs(lb[i]-result_lb[i]) == 0);
}
diff --git a/scilab2c/src/signalProcessing/lpc2cep/Makefile.am b/scilab2c/src/signalProcessing/lpc2cep/Makefile.am
index d2ed3bed..6ab64984 100644
--- a/scilab2c/src/signalProcessing/lpc2cep/Makefile.am
+++ b/scilab2c/src/signalProcessing/lpc2cep/Makefile.am
@@ -14,6 +14,8 @@
libLpc2cep_la_CFLAGS = -I $(top_builddir)/type \
+ -I $(top_builddir)/elementaryFunctions/includes \
+ -I $(top_builddir)/auxiliaryFunctions/includes \
-I $(top_builddir)/matrixOperations/includes \
-I $(top_builddir)/operations/includes \
-I $(top_builddir)/signalProcessing/includes
@@ -58,7 +60,9 @@ check_LDADD = $(top_builddir)/type/libDoubleComplex.la \
$(top_builddir)/matrixOperations/multiplication/libMatrixMultiplication.la \
$(top_builddir)/matrixOperations/transpose/libMatrixTranspose.la \
$(top_builddir)/matrixOperations/inversion/libMatrixInversion.la \
- $(top_builddir)/matrixOperations/logm/libLogm.la
+ $(top_builddir)/matrixOperations/logm/libLogm.la\
+ $(top_builddir)/matrixOperations/spec2/libSpec2.la\
+ $(top_builddir)/matrixOperations/zeros/libMatrixZeros.la\
$(top_builddir)/signalProcessing/fft/libFft.la \
$(top_builddir)/signalProcessing/ifft/libIfft.la \
$(top_builddir)/signalProcessing/lpc2cep/libLpc2cep.la \
@@ -66,7 +70,10 @@ check_LDADD = $(top_builddir)/type/libDoubleComplex.la \
check_INCLUDES = -I $(top_builddir)/type \
+ -I $(top_builddir)/elementaryFunctions/includes \
+ -I $(top_builddir)/auxiliaryFunctions/includes \
-I $(top_builddir)/matrixOperations/includes \
+ -I $(top_builddir)/operations/includes \
-I $(top_builddir)/signalProcessing/includes
diff --git a/scilab2c/src/signalProcessing/lpc2cep/Makefile.in b/scilab2c/src/signalProcessing/lpc2cep/Makefile.in
index 4b9d5a7e..7c2607eb 100644
--- a/scilab2c/src/signalProcessing/lpc2cep/Makefile.in
+++ b/scilab2c/src/signalProcessing/lpc2cep/Makefile.in
@@ -64,7 +64,31 @@ libLpc2cep_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
am_testDoubleLpc2cep_OBJECTS = \
testDoubleLpc2cep-testDoubleLpc2cep.$(OBJEXT)
testDoubleLpc2cep_OBJECTS = $(am_testDoubleLpc2cep_OBJECTS)
-testDoubleLpc2cep_DEPENDENCIES = $(check_LDADD)
+am__DEPENDENCIES_1 = $(top_builddir)/type/libDoubleComplex.la \
+ $(top_builddir)/type/libFloatComplex.la \
+ $(top_builddir)/lib/lapack/libscilapack.la \
+ $(top_builddir)/lib/blas/libsciblas.la \
+ $(top_builddir)/elementaryFunctions/log/libLog.la \
+ $(top_builddir)/elementaryFunctions/sqrt/libSqrt.la \
+ $(top_builddir)/elementaryFunctions/log1p/libLog1p.la \
+ $(top_builddir)/elementaryFunctions/lnp1m1/libLnp1m1.la \
+ $(top_builddir)/auxiliaryFunctions/abs/libAbs.la \
+ $(top_builddir)/auxiliaryFunctions/conj/libConj.la \
+ $(top_builddir)/auxiliaryFunctions/pythag/libPythag.la \
+ $(top_builddir)/auxiliaryFunctions/sign/libSign.la \
+ $(top_builddir)/operations/addition/libAddition.la \
+ $(top_builddir)/operations/subtraction/libSubtraction.la \
+ $(top_builddir)/operations/multiplication/libMultiplication.la \
+ $(top_builddir)/matrixOperations/multiplication/libMatrixMultiplication.la \
+ $(top_builddir)/matrixOperations/transpose/libMatrixTranspose.la \
+ $(top_builddir)/matrixOperations/inversion/libMatrixInversion.la \
+ $(top_builddir)/matrixOperations/logm/libLogm.la \
+ $(top_builddir)/matrixOperations/spec2/libSpec2.la \
+ $(top_builddir)/matrixOperations/zeros/libMatrixZeros.la \
+ $(top_builddir)/signalProcessing/fft/libFft.la \
+ $(top_builddir)/signalProcessing/ifft/libIfft.la \
+ $(top_builddir)/signalProcessing/lpc2cep/libLpc2cep.la
+testDoubleLpc2cep_DEPENDENCIES = $(am__DEPENDENCIES_1)
testDoubleLpc2cep_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
$(LIBTOOLFLAGS) --mode=link $(CCLD) \
$(testDoubleLpc2cep_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) \
@@ -72,7 +96,7 @@ testDoubleLpc2cep_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
am_testFloatLpc2cep_OBJECTS = \
testFloatLpc2cep-testFloatLpc2cep.$(OBJEXT)
testFloatLpc2cep_OBJECTS = $(am_testFloatLpc2cep_OBJECTS)
-testFloatLpc2cep_DEPENDENCIES = $(check_LDADD)
+testFloatLpc2cep_DEPENDENCIES = $(am__DEPENDENCIES_1)
testFloatLpc2cep_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
$(LIBTOOLFLAGS) --mode=link $(CCLD) $(testFloatLpc2cep_CFLAGS) \
$(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
@@ -206,6 +230,8 @@ target_alias = @target_alias@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
libLpc2cep_la_CFLAGS = -I $(top_builddir)/type \
+ -I $(top_builddir)/elementaryFunctions/includes \
+ -I $(top_builddir)/auxiliaryFunctions/includes \
-I $(top_builddir)/matrixOperations/includes \
-I $(top_builddir)/operations/includes \
-I $(top_builddir)/signalProcessing/includes
@@ -237,10 +263,19 @@ check_LDADD = $(top_builddir)/type/libDoubleComplex.la \
$(top_builddir)/matrixOperations/multiplication/libMatrixMultiplication.la \
$(top_builddir)/matrixOperations/transpose/libMatrixTranspose.la \
$(top_builddir)/matrixOperations/inversion/libMatrixInversion.la \
- $(top_builddir)/matrixOperations/logm/libLogm.la
+ $(top_builddir)/matrixOperations/logm/libLogm.la\
+ $(top_builddir)/matrixOperations/spec2/libSpec2.la\
+ $(top_builddir)/matrixOperations/zeros/libMatrixZeros.la\
+ $(top_builddir)/signalProcessing/fft/libFft.la \
+ $(top_builddir)/signalProcessing/ifft/libIfft.la \
+ $(top_builddir)/signalProcessing/lpc2cep/libLpc2cep.la \
+ @LIBMATH@
check_INCLUDES = -I $(top_builddir)/type \
+ -I $(top_builddir)/elementaryFunctions/includes \
+ -I $(top_builddir)/auxiliaryFunctions/includes \
-I $(top_builddir)/matrixOperations/includes \
+ -I $(top_builddir)/operations/includes \
-I $(top_builddir)/signalProcessing/includes
testDoubleLpc2cep_SOURCES = testDoubleLpc2cep.c
@@ -676,10 +711,6 @@ uninstall-am: uninstall-pkglibLTLIBRARIES
mostlyclean-libtool pdf pdf-am ps ps-am tags uninstall \
uninstall-am uninstall-pkglibLTLIBRARIES
- $(top_builddir)/signalProcessing/fft/libFft.la \
- $(top_builddir)/signalProcessing/ifft/libIfft.la \
- $(top_builddir)/signalProcessing/lpc2cep/libLpc2cep.la \
- @LIBMATH@
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT: