Home | History | Annotate | Download | only in dist

Lines Matching refs:factor

129 struct factor_t  *factor;
130 int nfactor; /* entries in use in factor array */
131 int factor_alloc; /* entries allocated to factor array */
246 factor = (struct factor_t *) xmalloc (factor_alloc * sizeof (*factor));
300 /* if a repeated prime is found it's used as an i^n in one factor */
328 sprintf (mod34_excuse, "only %d small factor%s",
385 /* start the factor array */
390 factor[nfactor].divisor = 1;
392 factor[nfactor].divisor *= rawfactor[i].divisor;
397 /* Combine entries in the factor array. Combine the smallest entry with
400 qsort (factor, nfactor, sizeof (factor[0]), f_cmp_divisor);
403 if (factor[i].divisor <= max_divisor / factor[0].divisor)
405 factor[0].divisor *= factor[i].divisor;
406 COLLAPSE_ELEMENT (factor, i, nfactor);
414 mpz_init (factor[i].inverse);
415 mpz_invert_ui_2exp (factor[i].inverse,
416 (unsigned long) factor[i].divisor,
419 mpz_init (factor[i].mask);
420 square_mask (factor[i].mask, factor[i].divisor);
423 factor[i].fraction = (double) mpz_popcount (factor[i].mask)
424 / factor[i].divisor;
427 total_fraction *= factor[i].fraction;
431 qsort (factor, nfactor, sizeof (factor[0]), f_cmp_fraction);
514 (1.0 - factor[i].fraction) * 100.0);
517 factor[i].divisor <= limb_bits ? 1 : 2,
518 factor[i].divisor);
519 mpz_out_str (stdout, 16, factor[i].inverse);
523 if ( factor[i].divisor <= limb_bits)
525 mpz_out_str (stdout, 16, factor[i].mask);
529 mpz_tdiv_r_2exp (mlo, factor
530 mpz_tdiv_q_2exp (mhi, factor[i].mask, (unsigned long) limb_bits);
548 printf (" %d,", factor[i].divisor);