Imported Healpix, cfitsio, cosmotool. Added cmake tool to build dependencies (cfitsio, hdf5, netcdf, boost, healpix, gsl, ..). Adjusted CMakeLists.txt

This commit is contained in:
Guilhem Lavaux 2012-10-30 14:17:11 -04:00
parent 4bfb62f177
commit 51f6798f88
241 changed files with 243806 additions and 0 deletions

View file

@ -0,0 +1,27 @@
#include <iostream>
#include <cmath>
using namespace std;
#include "newton.hpp"
using namespace CosmoTool;
struct SimplePolynom
{
double eval(double x) { return x*x*x+2*x-1; }
double derivative(double x) { return 3*x*x+2; }
};
int main()
{
SimplePolynom poly;
double r;
double solution = -2*pow(2./(3*(9+sqrt(177.))), 1./3) + (pow(0.5*(9+sqrt(177.))/9, 1./3));
r = newtonSolver(3.0, poly);
cout << "Result = " << r << " delta = " << r-solution << endl;
return 0;
}