@Override
	public Value evaluate(Value... arguments) throws Exception {
		// Check the number of argument
		if (arguments.length == 1) {
			// get Value
			Value value = arguments[0];

			// If numerical
			if (value.getType().isNumeric()) {
				return new Value(new Double(Math.tan(value.getDouble())));
			}
			if (value.getType() == ValueType.ARRAY) {
				Value[] vector = value.getValues();
				Value result[] = new Value[vector.length];
				for (int i = 0; i < vector.length; i++) {
					result[i] = evaluate(vector[i]);
				}
				return new Value(result);
			}

			// the type is incorrect
			throw new EvalException(this.name() + " function does not handle "
					+ value.getType().toString() + " type");
		}

		// number of argument is incorrect
		throw new EvalException(this.name()
				+ " function only allows one numerical parameter");
	}