• Home
  • Raw
  • Download

Lines Matching full:pow

7 use num_traits::{One, Pow, ToPrimitive, Zero};
9 impl Pow<&BigUint> for BigUint {
13 fn pow(self, exp: &BigUint) -> BigUint { in pow() method
19 self.pow(exp) in pow()
21 self.pow(exp) in pow()
24 // `2.pow(2¹²⁸)` would require far more memory than 64-bit targets can address! in pow()
30 impl Pow<BigUint> for BigUint {
34 fn pow(self, exp: BigUint) -> BigUint { in pow() method
35 Pow::pow(self, &exp) in pow()
39 impl Pow<&BigUint> for &BigUint { impl
43 fn pow(self, exp: &BigUint) -> BigUint { in pow() method
49 self.clone().pow(exp) in pow()
54 impl Pow<BigUint> for &BigUint { impl
58 fn pow(self, exp: BigUint) -> BigUint { in pow() method
59 Pow::pow(self, &exp) in pow()
65 impl Pow<$T> for BigUint {
68 fn pow(self, mut exp: $T) -> BigUint {
95 impl Pow<&$T> for BigUint {
99 fn pow(self, exp: &$T) -> BigUint {
100 Pow::pow(self, *exp)
104 impl Pow<$T> for &BigUint { impl
108 fn pow(self, exp: $T) -> BigUint {
112 Pow::pow(self.clone(), exp)
116 impl Pow<&$T> for &BigUint { impl
120 fn pow(self, exp: &$T) -> BigUint {
121 Pow::pow(self, *exp)
144 // Otherwise do basically the same as `num::pow`, but with a modulus. in modpow()
227 two.pow(0b1_00000000_u32) % &modulus, in test_plain_modpow()
232 two.pow(0b10_00000000_u32) % &modulus, in test_plain_modpow()
237 two.pow(0b110010_00000000_u32) % &modulus, in test_plain_modpow()
242 two.pow(0b1_00000001_u32) % &modulus, in test_plain_modpow()
247 two.pow(0b1_00000000_00001100_u32) % &modulus, in test_plain_modpow()
257 assert_eq!(BigUint::from(125u8), base.pow(exponent)); in test_pow_biguint()