[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Help-gsl] Gsl-1.8 compiled and running under MSYS-1.10+second order

From: Rene Girard
Subject: Re: [Help-gsl] Gsl-1.8 compiled and running under MSYS-1.10+second order derivative
Date: Wed, 1 Nov 2006 18:07:19 -0500 (EST)


Thanks for the reply. I will certainly apply what you are suggesting



Brian Gough <address@hidden> wrote: Rene Girard wrote:

> double g1(double, double *);
> I would like to bring to your attention that when I
> compile that simple example and
> I set the pointer to the function from we want to have
> the derivative with the following
> statement:
>   f.function = &g1; (like in the example in Chap. 27)
> I get the following warning:
> "warning: assignment from incompatible pointer type"
> to remove the warning I had to cast the pointer as
> follow:
>  f.function = (double (*) ()) &g1;

Thanks for your email.  I think your warning can be avoided without a 
cast by using the prototype double g1(double, void *) which matches the 
definition in GSL.  Otherwise, the appropriate cast would be (double 
(*)(double, void *)). See the header file gsl_math.h for the definition 
of the gsl_function type.

best regards,

Brian Gough
(GSL Maintainer)

Network Theory Ltd,
Publishing the GSL Manual -

The best gets better. See why everyone is raving about the All-new Yahoo! Mail. 

reply via email to

[Prev in Thread] Current Thread [Next in Thread]