yes, although it would be a good idea to avoid generating NaNs by evaluating f 
after checking the sign of x (and also the sign of the product alpha*x)

On Wednesday 17 July 2013 14:02:45 Mátyás Benke wrote:
> 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

Reply via email to