Beispiel #1
0
 public static void testBigNumber() {
   // 构建大数值计算引擎
   FelEngine fel = FelBuilder.bigNumberEngine();
   FelContext ctx = fel.getContext();
   ctx.set("num", new BigInteger("22222222222222222222222222222222"));
   String input = "111111111111111111111111111111+num";
   Object value = fel.eval(input);
   Object compileValue = fel.compile(input, ctx).eval(ctx);
   System.out.println("大数值计算(解释执行):" + value);
   System.out.println("大数值计算(编译执行):" + compileValue);
 }
Beispiel #2
0
 private static FelEngine getEngine() {
   return FelBuilder.engine();
 }