bug-gsl
[Top][All Lists]
Advanced

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

Re: [Bug-gsl] Bug - GSL_FN_FDF_EVAL_F


From: Patrick Alken
Subject: Re: [Bug-gsl] Bug - GSL_FN_FDF_EVAL_F
Date: Fri, 20 Feb 2015 09:17:21 -0700
User-agent: Mozilla/5.0 (X11; Linux i686 on x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.4.0

I don't fully understand the issue. In gsl_math.h, we have:

135 struct gsl_function_fdf_struct
136 {
137   double (* f) (double x, void * params);
138   double (* df) (double x, void * params);
139   void (* fdf) (double x, void * params, double * f, double * df);
140   void * params;
141 };
142
143 typedef struct gsl_function_fdf_struct gsl_function_fdf ;
144
145 #define GSL_FN_FDF_EVAL_F(FDF,x) (*((FDF)->f))(x,(FDF)->params)

Therefore there is an 'f' field of gsl_function_fdf which means the macro should work ok. There is no 'function' field so I don't see how your change will work. Also, this macro is used by several modules in the roots directory so it seems to be functioning properly

On 02/19/2015 07:06 PM, Edith Viau wrote:
Hi everyone : )

I think that a small bug was lost in versioning... Correct me if I am
wrong, and I am most sorry if this issue was already brought up to you - I
was unable to find previous mentions of this.

In the gsl_math.h file, line 145. We read :

#define GSL_FN_FDF_EVAL_F(FDF,x) (*((FDF)->*f)*)(x,(FDF)->params)


It should be :


#define GSL_FN_FDF_EVAL_F(FDF,x) (*((FDF)->*function*))(x,(FDF)->params)


When I make the change, I am able to use the macro as intended.  The change
is in bold.


Let me know if there is anything or if I should provide a program sample.


Have a great day/evening,


Edith




reply via email to

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