예제 #1
0
 public static BigInteger Modulus(Rational n, BigInteger p)
 {
     if (n.IsInteger)
     {
         return(IntegerMath.Modulus((BigInteger)n, p));
     }
     return(IntegerMath.ModularQuotient(n.Numerator, n.Denominator, p));
 }
예제 #2
0
 public override Rational ModularQuotient(Rational a, Rational b, Rational modulus)
 {
     return(IntegerMath.ModularQuotient((BigInteger)a, (BigInteger)b, (BigInteger)modulus));
 }
예제 #3
0
 public override uint ModularQuotient(uint a, uint b, uint modulus)
 {
     return(IntegerMath.ModularQuotient(a, b, modulus));
 }
 public override Int128 ModularQuotient(Int128 a, Int128 b, Int128 modulus)
 {
     return((Int128)IntegerMath.ModularQuotient(a, b, modulus));
 }
예제 #5
0
 public override ulong ModularQuotient(ulong a, ulong b, ulong modulus)
 {
     return(IntegerMath.ModularQuotient(a, b, modulus));
 }
 public override double ModularQuotient(double a, double b, double modulus)
 {
     return((double)IntegerMath.ModularQuotient(ToBigInteger(a), ToBigInteger(b), ToBigInteger(modulus)));
 }
 public override Complex ModularQuotient(Complex a, Complex b, Complex modulus)
 {
     return((Complex)IntegerMath.ModularQuotient(ToBigInteger(a), ToBigInteger(b), ToBigInteger(modulus)));
 }
 public override BigInteger ModularQuotient(BigInteger a, BigInteger b, BigInteger modulus)
 {
     return(IntegerMath.ModularQuotient(a, b, modulus));
 }