Esempio n. 1
0
 public static double Root(BigInteger i, int rootValue)
 {
     return(Math.Floor(Math.Exp(BigInteger.Log(i) / rootValue)));
 }
Esempio n. 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)));
        }