/* ++pac
 * 
#include "../gsl_machine.h"
#include "../gsl_math.h"
#include "../err/gsl_errno.h"
#include "./gsl_integration.h"
//#include <gsl/gsl_test.h>
//#include <../gsl_ieee_utils.h>

//#include "tests.h"

/* f1(x) = x^alpha * log(1/x) */
/* integ(f1,x,0,1) = 1/(alpha + 1)^2 */

double f1 (double x) {
  double alpha = 2.6 ;
  return pow(x,alpha) * log(1/x) ;
}

int main (void)
{

  /* Test the basic Gauss-Kronrod rules with a smooth positive function. */

    double result = 0, abserr = 0, resabs = 0, resasc = 0 ;
    double exp_result = 7.716049357767090777E-02;
    double exp_abserr = 2.990224871000550874E-06;
    double exp_resabs = 7.716049357767090777E-02;
    double exp_resasc = 4.434273814139995384E-02;


    gsl_integration_qk15 (&f, 0.0, 1.0, 
                                  &result, &abserr, &resabs, &resasc) ;
    gsl_integration_qk15 (&f, 1.0, 0.0, 
                                  &result, &abserr, &resabs, &resasc) ;
print("%d  %d  %d  %d  \n", result , abserr, resabs, resasc);
print("%d  %d  %d  %d  \n", exp_result , exp_abserr, exp_resabs, exp_resasc);


 }
