anchor.diff:  var
     Q, R: BigInteger;
   begin
  +
     if Right.IsZero then
       raise Exception.Create('Division by zero')
     else if Right.IsNegative then
  
positive.code: end;
  
  // Replacement for SetLength() only for TMagnitudes, i.e. dynamic arrays of TLimb.
  procedure AllocNewMagnitude(var FData: TMagnitude; RequiredSize: Integer);
  var
    NewData: PByte;
    NewSize: Integer;
  
negative.code:   // return (s, r)
  end;
  
  class procedure BigInteger.DivThreeHalvesByTwo(const LeftUpperMid, LeftLower, Right, RightUpper: BigInteger;
    const {$IFDEF RIO64}[ref]{$ENDIF} RightLower: BigInteger; N: Integer;
    var Quotient, Remainder: BigInteger);
  var
    Q, R: BigInteger;
  begin
    if RightLower.FData <> nil then
      ;
    Q := BigInteger.Zero;
    R := BigInteger.Zero;
    if (LeftUpperMid shr N) = RightUpper then
  