Changeset 499
- Timestamp:
- Jan 18, 2006, 5:26:09 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/test/averager_test.cc
r490 r499 8 8 9 9 #include <fstream> 10 #include <limits> 10 11 #include <iostream> 11 12 … … 71 72 72 73 73 if ( a.variance() != a.std()*a.std() ){ 74 if ( fabs(a.variance() - a.std()*a.std())> 75 std::numeric_limits<double>().round_error() ){ 74 76 ok=false; 75 77 *error << "error: std squared should be variance" << std::endl; 76 *error << "std : " <<a.std() << std::endl;78 *error << "std2: " << a.std()*a.std() << std::endl; 77 79 *error << "variance: " << a.variance() << std::endl; 80 *error << "difference is: " << a.std()*a.std()-a.variance() << std::endl; 78 81 } 79 82 … … 97 100 a.reset(); 98 101 a.add(x); 99 const double tol= 0.0001;102 const double tol=std::numeric_limits<double>().round_error(); 100 103 if (!equal(a,aw,tol,error)){ 101 104 *error << "error: AveragerWeighted with unitary weights should "
Note: See TracChangeset
for help on using the changeset viewer.