anchor.diff:  
   var
     Two: BigInteger;
  +  DeterminicityThreshold: BigInteger;
  +  CertainlyComposite: BigInteger;
     Random: IRandom;
   
   // Rabin-Miller test, deterministically correct for N < 341,550,071,728,321.
  
positive.code: 
    // Now check if A is a witness to N's compositeness
    Result := IsComposite(A, D, N, R);
  
  //  Estimate := BigInteger.ModPow(A, D, N);
  //  for I := 0 to R - 1 do
  //  begin
  //    NewEstimate := (Estimate * Estimate) mod N;
  //    if (NewEstimate = BigInteger.One) and (Estimate <> BigInteger.One) and (Estimate <> N - BigInteger.One) then
  //      Exit(True);
  //    Estimate := NewEstimate;
  //  end;
  //  Result := Estimate <> BigInteger.One;
  end;
  
  function IsComposite(const A, D, N: BigInteger; S: Integer): Boolean;
  
negative.code: 
  /// <summary>Returns a random probably prime number.</summary>
  /// <param name="NumBits">Maximum number of bits of th random number</param>
  /// <param name="Precision">Precision to be used for IsProbablePrime</param>
  /// <returns> a random prime number that is probably prime with the given precision.</returns>
  function RandomProbablePrime(NumBits: Integer; Precision: Integer): BigInteger;
  
  