### Question:
RealPolynomialFunction1D implements DoubleFunction1D { @Override public double applyAsDouble(double x) { ArgChecker.notNull(x, "x"); double y = _coefficients[_n - 1]; for (int i = _n - 2; i >= 0; i--) { y = x * y + _coefficients[i]; } return y; } RealPolynomialFunction1D(double... coefficients); @Override double applyAsDouble(double x); double[] getCoefficients(); @Override DoubleFunction1D add(DoubleFunction1D f); @Override RealPolynomialFunction1D add(double a); @Override RealPolynomialFunction1D derivative(); @Override RealPolynomialFunction1D divide(double a); @Override DoubleFunction1D multiply(DoubleFunction1D f); @Override RealPolynomialFunction1D multiply(double a); @Override DoubleFunction1D subtract(DoubleFunction1D f); @Override RealPolynomialFunction1D subtract(double a); RealPolynomialFunction1D toMonic(); @Override boolean equals(Object obj); @Override int hashCode();  }### Answer:
@Test public void testEvaluate() { final double x = RANDOM.nextDouble(); assertThat(C[3] * Math.pow(x, 3) + C[2] * Math.pow(x, 2) + C[1] * x + C[0]).isCloseTo(F.applyAsDouble(x), offset(EPS)); }