class BigIntCache {
    private BigIntCache() {}

    static final AviatorBigInt cache[] = new AviatorBigInt[256];

    static {
      for (long i = 0; i < cache.length; i++) {
        cache[(int) i] = new AviatorBigInt(BigInteger.valueOf(i - 128));
      }
    }
  }



  @Override
  public Object getValue(Map<String, Object> env) {
    return this.number;
  }


  @Override
  public long longValue() {
    return this.number.longValue();
  }


  @Override
  public double doubleValue() {
    return this.number.doubleValue();
  }


  public AviatorBigInt(Number number) {
    super(number);
  }


  public static final AviatorBigInt valueOf(BigInteger v) {
    return new AviatorBigInt(v);
  }


  public static final AviatorBigInt valueOf(String v) {
    return new AviatorBigInt(new BigInteger(v));
  }


  public static final AviatorBigInt valueOf(long l) {
    final int offset = 128;
    if (l >= -128 && l <= 127) {
      return BigIntCache.cache[(int) l + offset];
    }
    return valueOf(BigInteger.valueOf(l));
  }


  @Override
  public AviatorObject neg(Map<String, Object> env) {
    return AviatorBigInt.valueOf(this.toBigInt().negate());
  }


  @Override
  public AviatorObject innerSub(Map<String, Object> env, AviatorNumber other) {
    switch (other.getAviatorType()) {
      case Decimal:
        return AviatorDecimal.valueOf(
            this.toDecimal(env).subtract(other.toDecimal(env), RuntimeUtils.getMathContext(env)));
      case Double:
        return AviatorDouble.valueOf(this.doubleValue() - other.doubleValue());
      default:
        return AviatorBigInt.valueOf(this.toBigInt().subtract(other.toBigInt()));
    }
  }


  @Override
  public AviatorObject innerMult(Map<String, Object> env, AviatorNumber other) {
    switch (other.getAviatorType()) {
      case Decimal:
        return AviatorDecimal.valueOf(
            this.toDecimal(env).multiply(other.toDecimal(env), RuntimeUtils.getMathContext(env)));
      case Double:
        return AviatorDouble.valueOf(this.doubleValue() * other.doubleValue());
      default:
        return AviatorBigInt.valueOf(this.toBigInt().multiply(other.toBigInt()));
    }
  }


  @Override
  public AviatorObject innerMod(Map<String, Object> env, AviatorNumber other) {
    switch (other.getAviatorType()) {
      case Decimal:
        return AviatorDecimal.valueOf(
            this.toDecimal(env).remainder(other.toDecimal(env), RuntimeUtils.getMathContext(env)));
      case Double:
        return AviatorDouble.valueOf(this.doubleValue() % other.doubleValue());
      default:
        return AviatorBigInt.valueOf(this.toBigInt().mod(other.toBigInt()));
    }
  }


  @Override
  public AviatorObject innerDiv(Map<String, Object> env, AviatorNumber other) {
    switch (other.getAviatorType()) {
      case Decimal:
        return AviatorDecimal.valueOf(
            this.toDecimal(env).divide(other.toDecimal(env), RuntimeUtils.getMathContext(env)));
      case Double:
        return AviatorDouble.valueOf(this.doubleValue() / other.doubleValue());
      default:
        return AviatorBigInt.valueOf(this.toBigInt().divide(other.toBigInt()));
    }
  }


  @Override
  public AviatorNumber innerAdd(Map<String, Object> env, AviatorNumber other) {<FILL_FUNCTION_BODY>

    switch (other.getAviatorType()) {
      case Decimal:
        return AviatorDecimal.valueOf(
            this.toDecimal(env).add(other.toDecimal(env), RuntimeUtils.getMathContext(env)));
      case Double:
        return AviatorDouble.valueOf(this.doubleValue() + other.doubleValue());
      default:
        return AviatorBigInt.valueOf(this.toBigInt().add(other.toBigInt()));
    }
  
<methods>public com.googlecode.aviator.runtime.type.AviatorObject bitAnd(com.googlecode.aviator.runtime.type.AviatorObject, Map<java.lang.String,java.lang.Object>) ,public com.googlecode.aviator.runtime.type.AviatorObject bitNot(Map<java.lang.String,java.lang.Object>) ,public com.googlecode.aviator.runtime.type.AviatorObject bitOr(com.googlecode.aviator.runtime.type.AviatorObject, Map<java.lang.String,java.lang.Object>) ,public com.googlecode.aviator.runtime.type.AviatorObject bitXor(com.googlecode.aviator.runtime.type.AviatorObject, Map<java.lang.String,java.lang.Object>) ,public double doubleValue() ,public com.googlecode.aviator.runtime.type.AviatorType getAviatorType() ,public java.lang.Object getValue(Map<java.lang.String,java.lang.Object>) ,public com.googlecode.aviator.runtime.type.AviatorObject innerAdd(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorNumber) ,public int innerCompare(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorNumber) ,public com.googlecode.aviator.runtime.type.AviatorObject innerDiv(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorNumber) ,public com.googlecode.aviator.runtime.type.AviatorObject innerMod(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorNumber) ,public com.googlecode.aviator.runtime.type.AviatorObject innerMult(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorNumber) ,public 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 neg(Map<java.lang.String,java.lang.Object>) ,public com.googlecode.aviator.runtime.type.AviatorObject shiftLeft(com.googlecode.aviator.runtime.type.AviatorObject, Map<java.lang.String,java.lang.Object>) ,public com.googlecode.aviator.runtime.type.AviatorObject shiftRight(com.googlecode.aviator.runtime.type.AviatorObject, Map<java.lang.String,java.lang.Object>) ,public com.googlecode.aviator.runtime.type.AviatorObject unsignedShiftRight(com.googlecode.aviator.runtime.type.AviatorObject, Map<java.lang.String,java.lang.Object>) ,public static com.googlecode.aviator.runtime.type.AviatorLong valueOf(long) ,public static com.googlecode.aviator.runtime.type.AviatorLong valueOf(java.lang.Long) <variables>private static final long serialVersionUID