public TypeValuePair evaluate(final FormulaContext context, final ParameterCallback parameters) throws EvaluationException
{
final int parameterCount = parameters.getParameterCount();
if (parameterCount != 2)
{
throw new EvaluationException(LibFormulaErrorValue.ERROR_ARGUMENTS_VALUE);
}
final Type type1 = parameters.getType(0);
final Object value1 = parameters.getValue(0);
final BigDecimal divided = NumberUtil.getAsBigDecimal(context.getTypeRegistry().convertToNumber(type1, value1));
final Type type2 = parameters.getType(1);
final Object value2 = parameters.getValue(1);
final BigDecimal divisor = NumberUtil.getAsBigDecimal(context.getTypeRegistry().convertToNumber(type2, value2));
if(divisor.signum() == 0)
{
throw new EvaluationException(LibFormulaErrorValue.ERROR_ARITHMETIC_VALUE);
}
final BigDecimal divide = new BigDecimal(divided.divide(divisor, 0, BigDecimal.ROUND_FLOOR).intValue());
BigDecimal reminder = divided.subtract(divisor.multiply(divide));
if(divide.signum() == 0)