class AviatorDecimal extends AviatorNumber {


  private static final long serialVersionUID = 7084583813460322882L;


  public AviatorDecimal(final Number number) {
    super(number);
  }


  public static final AviatorDecimal valueOf(final BigDecimal d) {
    return new AviatorDecimal(d);
  }


  public static final AviatorDecimal valueOf(final Map<String, Object> env, final String d) {
    return new AviatorDecimal(new BigDecimal(d, RuntimeUtils.getMathContext(env)));
  }


  public static final AviatorDecimal valueOf(final AviatorEvaluatorInstance instance,
      final String d) {
    return new AviatorDecimal(
        new BigDecimal(d, instance.getOptionValue(Options.MATH_CONTEXT).mathContext));
  }

  @Override
  public AviatorObject innerSub(final Map<String, Object> env, final AviatorNumber other) {
    if (other.getAviatorType() != AviatorType.Double) {
      return AviatorDecimal
          .valueOf(toDecimal(env).subtract(other.toDecimal(env), RuntimeUtils.getMathContext(env)));
    } else {
      return AviatorDouble.valueOf(doubleValue() - other.doubleValue());
    }
  }


  @Override
  public AviatorObject neg(final Map<String, Object> env) {
    return AviatorDecimal.valueOf(toDecimal(env).negate());
  }


  @Override
  public AviatorObject innerMult(final Map<String, Object> env, final AviatorNumber other) {
    if (other.getAviatorType() != AviatorType.Double) {
      return AviatorDecimal
          .valueOf(toDecimal(env).multiply(other.toDecimal(env), RuntimeUtils.getMathContext(env)));
    } else {
      return AviatorDouble.valueOf(doubleValue() * other.doubleValue());
    }
  }


  @Override
  public AviatorObject innerMod(final Map<String, Object> env, final AviatorNumber other) {<FILL_FUNCTION_BODY>}


  @Override
  public AviatorObject innerDiv(final Map<String, Object> env, final AviatorNumber other) {
    if (other.getAviatorType() != AviatorType.Double) {
      return AviatorDecimal
          .valueOf(toDecimal(env).divide(other.toDecimal(env), RuntimeUtils.getMathContext(env)));
    } else {
      return AviatorDouble.valueOf(doubleValue() / other.doubleValue());
    }
  }


  @Override
  public AviatorNumber innerAdd(final Map<String, Object> env, final AviatorNumber other) {
    if (other.getAviatorType() != AviatorType.Double) {
      return AviatorDecimal
          .valueOf(toDecimal(env).add(other.toDecimal(env), RuntimeUtils.getMathContext(env)));
    } else {
      return AviatorDouble.valueOf(doubleValue() + other.doubleValue());
    }
  }


  @Override
  public int innerCompare(final Map<String, Object> env, final AviatorNumber other) {
    if (other.getAviatorType() != AviatorType.Double) {
      return toDecimal(env).compareTo(other.toDecimal(env));
    } else {
      return Double.compare(doubleValue(), other.doubleValue());
    }
  }


  @Override
  public AviatorType getAviatorType() {
    return AviatorType.Decimal;
  }

}

    if (other.getAviatorType() != AviatorType.Double) {
      return AviatorDecimal.valueOf(
          toDecimal(env).remainder(other.toDecimal(env), RuntimeUtils.getMathContext(env)));
    } else {
      return AviatorDouble.valueOf(doubleValue() % other.doubleValue());
    }
  
<methods>public void <init>(long) ,public void <init>(double) ,public void <init>(java.lang.Number) ,public com.googlecode.aviator.runtime.type.AviatorObject add(com.googlecode.aviator.runtime.type.AviatorObject, Map<java.lang.String,java.lang.Object>) ,public com.googlecode.aviator.runtime.type.AviatorObject div(com.googlecode.aviator.runtime.type.AviatorObject, Map<java.lang.String,java.lang.Object>) ,public double doubleValue() ,public java.lang.Object getValue(Map<java.lang.String,java.lang.Object>) ,public abstract com.googlecode.aviator.runtime.type.AviatorObject innerAdd(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorNumber) ,public int innerCompare(com.googlecode.aviator.runtime.type.AviatorObject, Map<java.lang.String,java.lang.Object>) ,public abstract int innerCompare(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorNumber) ,public abstract com.googlecode.aviator.runtime.type.AviatorObject innerDiv(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorNumber) ,public abstract com.googlecode.aviator.runtime.type.AviatorObject innerMod(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorNumber) ,public abstract com.googlecode.aviator.runtime.type.AviatorObject innerMult(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorNumber) ,public abstract com.googlecode.aviator.runtime.type.AviatorObject innerSub(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorNumber) ,public long longValue() ,public com.googlecode.aviator.runtime.type.AviatorObject mod(com.googlecode.aviator.runtime.type.AviatorObject, Map<java.lang.String,java.lang.Object>) ,public com.googlecode.aviator.runtime.type.AviatorObject mult(com.googlecode.aviator.runtime.type.AviatorObject, Map<java.lang.String,java.lang.Object>) ,public com.googlecode.aviator.runtime.type.AviatorObject sub(com.googlecode.aviator.runtime.type.AviatorObject, Map<java.lang.String,java.lang.Object>) ,public final java.math.BigInteger toBigInt() ,public final java.math.BigDecimal toDecimal(Map<java.lang.String,java.lang.Object>) ,public static com.googlecode.aviator.runtime.type.AviatorNumber valueOf(java.lang.Object) <variables>protected double doubleValue,protected long longValue,protected java.lang.Number number,private static final long serialVersionUID