anchor.diff:    // Note: the following self-devised algorithm works. I don't yet know if it can be optimized.
     // With "works", I mean that if A := B.Sqrt, then (A*A).RoundToScale(B.Scale) = B.
     Result.Init;
  +  Precision := System.Math.Max(Precision, 2 * Self.Precision);
     LScale := 0;
   
     // Determine a suitable factor to multiply FValue by to get a useful precision
     LMultiplier := RangeCheckedScale(Precision - Self.Precision + 1);
     if Odd(LMultiplier + Self.Scale) then
  -    Dec(LMultiplier);
  +    Inc(LMultiplier);
   
     // If the factor > 0, then multiply and use BigInteger.Sqrt and adjust scale accordingly
     if LMultiplier > 0 then
  
positive.code: 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;
  
negative.code: 
  class function BigDecimal.Sqrt(const Value: BigDecimal; Precision: Integer): BigDecimal;
  begin
    Result := Value.Sqrt(System.Math.Max(Precision, DefaultPrecision));
  end;
  
  class function BigDecimal.Sqrt(const Value: BigDecimal): BigDecimal;
  begin
    Result := Value.Sqrt(System.Math.Max(DefaultPrecision, Value.Precision));
  end;
  
  function BigDecimal.Sqrt(Precision: Integer): BigDecimal;
  