#include #include using namespace std; #include #include #define PI 3.14159265359 extern "C" { double gsl_sf_hyperg_1F1(double a, double b, double x); } int main(int argc, char *argv[]) { // load Mathematica test file ifstream fin; fin.open("erfi.dat", iostream::in); if (!fin.is_open()) { return -1; } int max=0; char str[256]; double t, fval; double data[3][1000]; while (!fin.eof()) { fin.getline(str, sizeof(str)); sscanf(str, "%lf %lf", &t, &fval); data[0][max] = t; data[1][max] = fval; max++; } fin.close(); // evaluate gsl function for (int i=0; i