package ec.app.regression.testcases;

public class NonicFactory extends FunctionFactory {

	@Override
	protected int arity() {
		return 1;
	}

	@Override
	protected double function(final Double... x) {
		return x[0] * (1 + x[0] * (1 + x[0] * (1 + x[0] * (1 + x[0] * (1 + x[0] * (1 + x[0] * (1 + x[0] * (1 + x[0]))))))));
	}

	@Override
	public String getSymbolicRepresentation() {
		return "x0 * (1 + x0 * (1 + x0 * (1 + x0 * (1 + x0 * (1 + x0 * (1 + x0 * (1 + x0 * (1 + x0))))))))";
	}
}
