protected static double evaluate(double[] coefficients, double argument)
throws NullArgumentException, NoDataException {
MathUtils.checkNotNull(coefficients);
int n = coefficients.length;
if (n == 0) {
throw new NoDataException(LocalizedFormats.EMPTY_POLYNOMIALS_COEFFICIENTS_ARRAY);
}
double result = coefficients[n - 1];
for (int j = n - 2; j >= 0; j--) {
result = argument * result + coefficients[j];
}