Package com.singularsys.extensions.fastreal

Fast evaluation routines over doubles, can be up to ten times faster than standard Jep.
// Construct the compiler/evaluator
RpEval rpe = new RpEval(jep);

// Compile an expression
RpCommandList commands = rpe.compile(expression);

// Get a reference number for the "x" variable
int xRef = rpe.getVarRef("x");

// loop
for(double x=-1.0;x<=1.0;x+=0.01) {
        
        // set the value of "x"
        rpe.setVarValue(xRef,x);
        
        // evaluate
        double res = rpe.evaluate(commands);
}

Since:
Jep 3.5 / Extensions 2.0
See Also:
Manual page