p[k] = randomPolynomial(degree, random);
pPrime[k] = p[k].polynomialDerivative();
maxDegree = FastMath.max(maxDegree, degree);
}
DfpField field = new DfpField(30);
Dfp step = field.getOne().divide(field.newDfp(10));
FieldHermiteInterpolator<Dfp> interpolator = new FieldHermiteInterpolator<Dfp>();
for (int j = 0; j < 1 + maxDegree / 2; ++j) {
Dfp x = field.newDfp(j).multiply(step);
Dfp[] values = new Dfp[p.length];
Dfp[] derivatives = new Dfp[p.length];
for (int k = 0; k < p.length; ++k) {
values[k] = field.newDfp(p[k].value(x.getReal()));
derivatives[k] = field.newDfp(pPrime[k].value(x.getReal()));
}
interpolator.addSamplePoint(x, values, derivatives);
}
Dfp h = step.divide(field.newDfp(100000));
for (int j = 0; j < 20; ++j) {
Dfp x = field.newDfp(j).multiply(step);
Dfp[] y = interpolator.value(x);
Dfp[] yP = interpolator.value(x.add(h));
Dfp[] yM = interpolator.value(x.subtract(h));
Assert.assertEquals(p.length, y.length);
for (int k = 0; k < p.length; ++k) {