12 void cferpr(
const long int ich,
double *
par,
double *
ref,
const double s0,
double *errold,
double *errnew)
16 double r__, dsphi, dseps, dsrho, cs, sn, xp, yp;
18 double ctg, dsq, dyp, d__3;
40 for (
int ii= 0; ii< 25; ++ii) derivm[ii] = 0.;
44 xp =
ref[1] * cs +
ref[2] * sn;
45 yp =
ref[1] * sn -
ref[2] * cs;
46 double sinp3 =
sin(
par[3]);
53 dyp = r__ -
par[1] + yp;
54 dsphi = -r__ * (yp * dyp + xp * xp) / (dyp * dyp + xp * xp);
55 dseps = r__ * xp / (dyp * dyp + xp * xp);
56 dsrho = -r__ * s0 + r__ * r__ * dseps;
57 derivm[5] = dseps * ctg;
58 derivm[7] = -s0 / (sinp3 * sinp3);
59 derivm[8] = dsphi * ctg;
60 derivm[9] = dsrho * ctg;
61 derivm[15] =
par[5] * dseps;
64 dsq = sqrt(
ref[1]*
ref[1] +
ref[2]*
ref[2] + d__3*d__3 + 2.*d__3*yp);
65 derivm[4] = -(r__*r__) +
d_sign(1., r__) * (r__*r__) * dyp / dsq;
66 derivm[3] =
d_sign(1., r__) * (
par[1] - r__) * xp / dsq;
67 derivm[19] = s0 +
par[5] * dsrho;
68 derivm[0] =
d_sign(1., r__) * dyp / dsq;
69 derivm[18] =
par[5] * dsphi + 1.;
75 derivm[7] = -xp / (sinp3 * sinp3);
76 derivm[8] = -yp * ctg;
78 tdasatVK(derivm, &errold[0], &errnew[0], 5, 5);