anchor.diff:    private
       type
         // Error codes to be used when calling the private static BigDecimal.Error method.
  -      TErrorCode = (ecParse, ecDivByZero, ecConversion, ecOverflow, ecUnderflow, ecInvalidArg, ecRounding);
  +      TErrorCode = (ecParse, ecDivByZero, ecConversion, ecOverflow, ecUnderflow, ecInvalidArg, ecRounding, ecExponent);
   
       var
         // The unscaled value of the BigDecimal.
  
positive.code:     ecRounding:
        // Rounding was necessary but rmUnnecessary was specified.
        raise ERoundingNecessary.Create(SRounding);
      else
        // Invalid operand to operator.
        raise EInvalidOpException.Create(SInvalidOperation);
  
negative.code:       LBase := (LBase * LBase).RoundToPrecision(Precision + 3);
        Exponent := Exponent shr 1;
      end;
    end
    else
      Result := IntPower(Base, Exponent);
  
    if LNegativeExp then
      Result := BigDecimal.Divide(BigDecimal.One, Result, Precision)
    else
      Result := Result.RoundToPrecision(Precision);
  
    if Result.Scale < Precision then
      Result := Result.RemoveTrailingZeros(0);
  end;
  
  class function BigDecimal.IntPower(const Base: BigDecimal; Exponent: Integer): BigDecimal;
  var
    LBase: BigDecimal;
    LNegativeExp: Boolean;
  begin
  
    if Exponent = 0 then
      Exit(BigDecimal.One);
  
    LNegativeExp := Exponent < 0;
    if LNegativeExp then
      Exponent := -Exponent;
  
    if Exponent > 9999999 then
      Error(ecExponent, []);
  
    Result := One;
    LBase := Base;
    while Exponent <> 0 do
  