diff --git a/sample/testEskow.cpp b/sample/testEskow.cpp index 05a92d5..ff19375 100644 --- a/sample/testEskow.cpp +++ b/sample/testEskow.cpp @@ -42,7 +42,10 @@ int main() { for (int j = 0; j < M.N; j++) { - cout << setprecision(25) << M(i,j) << " "; + if (j > i) + cout << "0 "; + else + cout << setprecision(25) << M(i,j) << " "; } cout << endl; } diff --git a/src/mach.hpp b/src/mach.hpp new file mode 100644 index 0000000..8e86883 --- /dev/null +++ b/src/mach.hpp @@ -0,0 +1,19 @@ +#ifndef __COSMO_MACHINE_TEST_HPP +#define __COSMO_MACHINE_TEST_HPP + +#include + +template +T mach_epsilon() +{ + T eps = (T)1; + do + { + eps /= 2; + } + while (( (T)1 + (eps/2)) != (T)1); + std::cout << " epsilon = " << eps << std::endl; + return eps; +} + +#endif