anchor.diff:      ecRounding:
         // Rounding was necessary but rmUnnecessary was specified.
         raise ERoundingNecessary.Create(SRounding);
  +    ecExponent:
  +      // Exponent outside the allowed range
  +      raise EIntPowerExponent.Create(SExponent);
       else
         // Invalid operand to operator.
         raise EInvalidOpException.Create(SInvalidOperation);
  
positive.code:     LBase := LBase * LBase;
      Exponent := Exponent shr 1;
    end;
  end;
  
  function BigDecimal.IntPower(Exponent, Precision: Integer): BigDecimal;
  
negative.code: class function BigDecimal.IntPower(const Base: BigDecimal; Exponent, Precision: 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, []);
  
    if (Base.Precision > 8) and (Exponent >= IntPowerExponentThreshold) then
    begin
      Result := One;
  