[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Help-gsl] QAWS & conditional IF / ELSE definition in integrand function
From: |
Mátyás Benke |
Subject: |
[Help-gsl] QAWS & conditional IF / ELSE definition in integrand function |
Date: |
Wed, 17 Jul 2013 19:02:45 +0200 |
Hi guys,
I have a quick question regarding the QAWS algorithm.
Does QAWS allow you to define the integrand function using IF / ELSE
conditions.
For example, will it work in the following way?
double f (double x, void * params)
{
double alpha = *(double *) params;
double f = log(alpha*x) / sqrt(x);
if (x > 0.0)
return f;
else
return 0.0;
}Cheers, Matyas
- [Help-gsl] QAWS & conditional IF / ELSE definition in integrand function,
Mátyás Benke <=