@@ -81,25 +81,21 @@ impl<const LIMBS: usize> Uint<LIMBS> {
8181
8282        ConstCtOption :: new ( x,  is_some) 
8383    } 
84+ } 
8485
86+ impl < const  LIMBS :  usize ,  const  UNSAT_LIMBS :  usize >  Uint < LIMBS > 
87+ where 
88+     Odd < Self > :  PrecomputeInverter < Inverter  = BernsteinYangInverter < LIMBS ,  UNSAT_LIMBS > > , 
89+ { 
8590    /// Computes the multiplicative inverse of `self` mod `modulus`, where `modulus` is odd. 
86- pub  const  fn  inv_odd_mod < const  UNSAT_LIMBS :  usize > ( 
87-         & self , 
88-         modulus :  & Odd < Self > , 
89-     )  -> ConstCtOption < Self > 
90-     where 
91-         Odd < Self > :  PrecomputeInverter < Inverter  = BernsteinYangInverter < LIMBS ,  UNSAT_LIMBS > > , 
92-     { 
91+ pub  const  fn  inv_odd_mod ( & self ,  modulus :  & Odd < Self > )  -> ConstCtOption < Self >  { 
9392        BernsteinYangInverter :: < LIMBS ,  UNSAT_LIMBS > :: new ( modulus,  & Uint :: ONE ) . inv ( self ) 
9493    } 
9594
9695    /// Computes the multiplicative inverse of `self` mod `modulus`. 
9796/// 
9897/// Returns some if an inverse exists, otherwise none. 
99- pub  const  fn  inv_mod < const  UNSAT_LIMBS :  usize > ( & self ,  modulus :  & Self )  -> ConstCtOption < Self > 
100-     where 
101-         Odd < Self > :  PrecomputeInverter < Inverter  = BernsteinYangInverter < LIMBS ,  UNSAT_LIMBS > > , 
102-     { 
98+ pub  const  fn  inv_mod ( & self ,  modulus :  & Self )  -> ConstCtOption < Self >  { 
10399        // Decompose `modulus = s * 2^k` where `s` is odd 
104100        let  k = modulus. trailing_zeros ( ) ; 
105101        let  s = modulus. overflowing_shr ( k) . unwrap_or ( Self :: ZERO ) ; 
0 commit comments