#include <crt_int.hpp>
Definition at line 234 of file crt_int.hpp.
Definition at line 238 of file crt_int.hpp.
References M, mmx::N(), probable_next_prime(), and mmx::value().
00238 { 00239 // construct probable prime moduli of s bits exactly. 00240 typedef modulus<C,V> M; 00241 const nat b= V::template maximum_size_helper<C>::value; 00242 ASSERT (s <= b, "bitsize overflow"); 00243 if (s < 2 && n > 0) return false; 00244 integer a (N(v) == 0 ? (integer (1) << (s-1)) : integer (* v[N(v)-1])); 00245 integer p= probable_next_prime (a); 00246 if (bit_size (p) > b) return false; 00247 v << M(as <C> (p)); 00248 return true; }