anchor.diff:      Lo: Cardinal;
       Hi: Integer;
     end;
  -begin
  -  if FValue.IsZero then
  -    Result := 1
  -  else
  -  begin
  -    // 1292913986 is Log10(2) * 1^32.
  -    Result := CardRec(FValue.BitLength * UInt64(1292913986)).Hi;
  +const
  +  // 1292913986 is Log10(2) * 1^32.
  +  CMultiplier = Int64(1292913986);
  +begin
  +  Result := FPrecision;
  +  if Result = 0 then
  +  begin
  +    //Note: Both 9999 ($270F) and 10000 ($2710) have a bitlength of 14, but 9999 has a precision of 4, while 10000 has a precision of 5.
  +    //      In other words: BitLength is not a good enough measure for precision. The test with the power of ten is necessary.
  +    Result := CardRec((FValue.BitLength + 1) * CMultiplier).Hi;
       if (GetPowerOfTen(Result) <= Abs(FValue)) or (Result = 0) then
         Inc(Result);
       FPrecision := Result;
  
positive.code:       // So 1.79 is coded as FValue = 179 and FScale = 2, whereas 1.7900 is coded as FValue = 17900 and FScale = 4.
        FScale: Int32;
  
        FPrecision: Int32;
  
      class var
  
negative.code:   if Right.FValue = BigInteger.Zero then
      Error(ecDivByZero, []);
    TargetScale := Left.Scale - Right.Scale;
    if Left.FValue.IsZero then
    begin
      Result.FValue := BigInteger.Zero;
      Result.FScale := TargetScale;
  