- cln::cl_RA b = cln::cl_RA(1-p)/2;
- const unsigned p3 = p+3;
- const unsigned pm = p-2;
- unsigned i, k, p_2;
- // test if intermediate unsigned int can be represented by immediate
- // objects by CLN (i.e. < 2^29 for 32 Bit machines, see <cln/object.h>)
+ cln::cl_RA b = cln::cl_RA(p-1)/-2;
+ // The CLN manual says: "The conversion from `unsigned int' works only
+ // if the argument is < 2^29" (This is for 32 Bit machines. More
+ // generally, cl_value_len is the limiting exponent of 2. We must make
+ // sure that no intermediates are created which exceed this value. The
+ // largest intermediate is (p+3-2*k)*(p/2-k+1) <= (p^2+p)/2.