diff --git a/tests/TestKajita2003.cpp b/tests/TestKajita2003.cpp index 24862a9f752fbda6f0e7a2db66d3ef6443871b86..d21b5c4da5fcdbc35cd9ddfc38f96f36286a6261 100644 --- a/tests/TestKajita2003.cpp +++ b/tests/TestKajita2003.cpp @@ -41,6 +41,19 @@ enum Profiles_t { PROFIL_PB_FLORENT_SEQ2 // 4 }; +double filterprecision(double adb) +{ + if (fabs(adb)<1e-7) + return 0.0; + + if (fabs(adb)>1e7) + return 1e7 ; + + double ladb2 = adb * 1e7; + double lintadb2 = trunc(ladb2); + return lintadb2/1e7; +} + class TestKajita2003: public TestObject { @@ -167,7 +180,7 @@ protected: aof.open(aFileName.c_str(),ofstream::app); aof.precision(8); aof.setf(ios::scientific, ios::floatfield); - for(unsigned int j = 0 ; j < m_numberOfSample ; j++){ + for(unsigned int j = 0 ; j < 20 ; j++){ aof << filterprecision( iteration * 0.5 ) << " " ; // 1 aof << filterprecision( 0.0 ) << " " ; // 1 aof << filterprecision( 0.0 ) << " " ; // 1