use of org.matheclipse.core.eval.interfaces.ISymbolEvaluator in project symja_android_library by axkr.
the class BuiltInSymbol method evaluate.
/** {@inheritDoc} */
@Override
public IExpr evaluate(EvalEngine engine) {
if (hasLocalVariableStack()) {
return IExpr.ofNullable(get());
}
IExpr result;
if ((result = evalDownRule(engine, this)).isPresent()) {
return result;
}
final IEvaluator module = getEvaluator();
if (module instanceof ISymbolEvaluator) {
IExpr temp;
if (engine.isNumericMode()) {
if (engine.isApfloat()) {
temp = ((ISymbolEvaluator) module).apfloatEval(this, engine);
} else {
temp = ((ISymbolEvaluator) module).numericEval(this);
}
} else {
temp = ((ISymbolEvaluator) module).evaluate(this);
}
return temp;
}
return F.NIL;
}
Aggregations