This is the mail archive of the gsl-discuss@sources.redhat.com mailing list for the GSL project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

documentation error


In http://sources.redhat.com/gsl/ref/gsl-ref_25.html#SEC376 ,
the line
#include <config.h> is an error , the program uses only the c standard and
gsl libraries
In the second line after main the variable yi is declared
double xi, yi, x[10], y[10];

but the only place where a variable named yi is being used is in a loop
 for (xi = x[0]; xi < x[9]; xi += 0.01)
      {
        double yi = gsl_spline_eval (spline, xi, acc);
        printf ("%g %g\n", xi, yi);
      }
and this yi has nothing to do with the yi declared above , so the first
declaration is unnecessary



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]