Added missing file

This commit is contained in:
Guilhem Lavaux 2011-12-13 22:43:53 -05:00
parent 8d4419d2fd
commit cf279bbb19
2 changed files with 23 additions and 1 deletions

View File

@ -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;
}

19
src/mach.hpp Normal file
View File

@ -0,0 +1,19 @@
#ifndef __COSMO_MACHINE_TEST_HPP
#define __COSMO_MACHINE_TEST_HPP
#include <iostream>
template<typename T>
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