Example #1
0
 public static double Root(BigInteger i, int rootValue)
 {
     return(Math.Floor(Math.Exp(BigInteger.Log(i) / rootValue)));
 }
Example #2
0
        public IEnumerable <BigInteger> PrimeFactorsByRationalSieve(BigInteger value)
        {
            var bound = value < 10000 ? Math.Ceiling(MathHelpers.Sqrt(value)) : Math.Ceiling(Math.Pow(BigInteger.Log(value, 2), 3));

            return(PrimeFactorsByRationalSieve(value, new BigInteger(bound)));
        }