package ec.app.regression.testcases;

public class Keijzer06Factory extends FunctionFactory {

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

	@Override
	protected double function(final Double... x) {
		int to = (int) Math.rint(x[0]);
		assert to >= 0;

		double sum = 0.0;

		for (int i = 0; i <= to; ++i) {
			sum += 1.0 / (double) i;
		}

		return sum;
	}

	@Override
	public String getSymbolicRepresentation() {
		throw new UnsupportedOperationException("Not implemented");
	}
}
