* x[2] <- pi / 6, etc, same for y[] (could use y <- scan() for y values)
* g <- splinefun(x, y, "natural")
* splinecoef <- eval(expression(z), envir = environment(g))
* print(splinecoef)
*/
PolynomialFunction polynomials[] = ((PolynomialSplineFunction) f).getPolynomials();
double target[] = {y[0], 1.002676d, 0d, -0.17415829d};
TestUtils.assertEquals(polynomials[0].getCoefficients(), target, coefficientTolerance);
target = new double[]{y[1], 8.594367e-01, -2.735672e-01, -0.08707914};
TestUtils.assertEquals(polynomials[1].getCoefficients(), target, coefficientTolerance);
target = new double[]{y[2], 1.471804e-17,-5.471344e-01, 0.08707914};