1 const size_t hahn1_N = 236;
2 const size_t hahn1_P = 7;
4 /* double hahn1_x0[7] = { 10, -1, 0.05, -0.00001, -0.05, 0.001, -0.000001 }; */
6 double hahn1_x0[7] = { 1, -0.1, 0.005, -0.000001, -0.005, 0.0001, -0.0000001};
18 double hahn1_sumsq = 1.5324382854E+00;
20 double hahn1_sigma[7] = {
30 double hahn1_F1[236] = {
270 double hahn1_F0[236] = {
511 hahn1_f (const gsl_vector * x, void *params, gsl_vector * f)
516 for (i = 0; i < 7; i++)
518 b[i] = gsl_vector_get(x, i);
521 for (i = 0; i < 236; i++)
523 double x = hahn1_F0[i];
524 double y = ((b[0] + x* (b[1] + x * (b[2] + x * b[3])))
525 / (1 + x*(b[4] + x *(b[5] + x*b[6]))));
526 gsl_vector_set (f, i, hahn1_F1[i] - y);
533 hahn1_df (const gsl_vector * x, void *params, gsl_matrix * df)
538 for (i = 0; i < 7; i++)
540 b[i] = gsl_vector_get(x, i);
543 for (i = 0; i < 236; i++)
545 double x = hahn1_F0[i];
546 double u = (b[0] + x*(b[1] + x*(b[2] + x * b[3])));
547 double v = (1 + x*(b[4] + x*(b[5] + x*b[6])));
548 gsl_matrix_set (df, i, 0, -1/v);
549 gsl_matrix_set (df, i, 1, -x/v);
550 gsl_matrix_set (df, i, 2, -x*x/v);
551 gsl_matrix_set (df, i, 3, -x*x*x/v);
552 gsl_matrix_set (df, i, 4, x*u/(v*v));
553 gsl_matrix_set (df, i, 5, x*x*u/(v*v));
554 gsl_matrix_set (df, i, 6, x*x*x*u/(v*v));
561 hahn1_fdf (const gsl_vector * x, void *params,
562 gsl_vector * f, gsl_matrix * df)
564 hahn1_f (x, params, f);
565 hahn1_df (x, params, df);