public static void FindPrimes(BigInteger minval, BigInteger maxval, string outFile) { FileTools.Delete(outFile); if (maxval < minval) { throw new Exception("maxval < minval"); } if (minval < Consts.BI2P64) { if (maxval < Consts.BI2P64) { Prime53.FindPrimes(Common.ToULong(minval), Common.ToULong(maxval), outFile, () => Ground.IsStopped() == false); } else { Prime53.FindPrimes(Common.ToULong(minval), ulong.MaxValue, outFile, () => Ground.IsStopped() == false); FindPrimes_BIBI(Consts.BI2P64, maxval, outFile, rate => 0.5 + rate * 0.5); } } else { FindPrimes_BIBI(minval, maxval, outFile, rate => rate); } }