Changeset cacfb6 in git for factory/fac_cantzass.cc
 Timestamp:
 Apr 9, 2010, 10:11:55 AM (13 years ago)
 Branches:
 (u'spielwiese', '91fdef05f09f54b8d58d92a472e9c4a43aa4656f')
 Children:
 8fc10886f09496df82af0116fe80edeeaeeaadc8
 Parents:
 f91fddc43db014d7355e8386a068d0a3772d2dcd
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

factory/fac_cantzass.cc
rf91fddc rcacfb6 236 236 mpz_init( &m ); 237 237 mpz_mypow_ui( &m, p, s ); 238 while ( mpz_cmp_si( &m, 0 ) != 0 ) { 239 odd = mpz_mdivmod_ui( &m, 0, &m, 2 ); 238 while ( mpz_cmp_si( &m, 0 ) != 0 ) 239 { 240 odd = mpz_fdiv_q_ui( &m, &m, 2 ); 240 241 if ( odd != 0 ) 241 242 prod = (prod * b) % d; … … 258 259 mpz_mypow_ui( &m, p, s ); 259 260 mpz_sub_ui( &m, &m, 1 ); 260 mpz_div_ui( &m, &m, 2 ); 261 while ( mpz_cmp_si( &m, 0 ) != 0 ) { 262 odd = mpz_mdivmod_ui( &m, 0, &m, 2 ); 261 mpz_fdiv_q_ui( &m, &m, 2 ); 262 while ( mpz_cmp_si( &m, 0 ) != 0 ) 263 { 264 odd = mpz_fdiv_q_ui( &m, &m, 2 ); 263 265 if ( odd != 0 ) 264 266 prod = (prod * b) % d; … … 281 283 mpz_mypow( &m, q, s ); 282 284 mpz_sub_ui( &m, &m, 1 ); 283 mpz_div_ui( &m, &m, 2 ); 284 while ( mpz_cmp_si( &m, 0 ) != 0 ) { 285 odd = mpz_mdivmod_ui( &m, 0, &m, 2 ); 285 mpz_fdiv_q_ui( &m, &m, 2 ); 286 while ( mpz_cmp_si( &m, 0 ) != 0 ) 287 { 288 odd = mpz_fdiv_q_ui( &m, &m, 2 ); 286 289 if ( odd != 0 ) 287 290 prod = (prod * b) % d;
Note: See TracChangeset
for help on using the changeset viewer.