예제 #1
0
 @Override
 public Sexp visit(RealExpr e) {
   Sexp numerator = Sexp.fromBigInt(e.value.unscaledValue());
   Sexp denominator = Sexp.fromBigInt(BigDecimal.TEN.pow(e.value.scale()).toBigInteger());
   return new Cons("/", numerator, denominator);
 }
예제 #2
0
 @Override
 public Sexp visit(IntExpr e) {
   return Sexp.fromBigInt(e.value);
 }