// 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 Manual page