evalAsArithmeticExpression

fun Term.evalAsArithmeticExpression(request: Solve.Request<*>, index: Int? = null): Numeric

Evaluates this Term as a full arithmetic expression (as is/2 does), via ArithmeticEvaluator, producing a Numeric result or raising an error if any sub-term is not evaluable, or does not evaluate to a number. index is used only to enrich thrown errors, identifying which argument of request this term came from.