Skip to content

Commit

Permalink
Use fmpz_set_ui in file handling of qsieve
Browse files Browse the repository at this point in the history
  • Loading branch information
albinahlback committed Nov 15, 2023
1 parent 2ce0e02 commit be04d86
Showing 1 changed file with 3 additions and 11 deletions.
14 changes: 3 additions & 11 deletions src/qsieve/large_prime_variant.c
Original file line number Diff line number Diff line change
Expand Up @@ -292,17 +292,9 @@ relation_t qsieve_parse_relation(qs_t qs_inf)
#if COEFF_MAX != -COEFF_MIN
# error
#endif
if (abslimb <= (mp_limb_t) COEFF_MAX)
{
*rel.Y = (Ysz < 0) ? -abslimb : abslimb;
}
else
{
mpz_ptr mY = _fmpz_new_mpz();
mY->_mp_size = Ysz;
*mY->_mp_d = abslimb;
*rel.Y = PTR_TO_COEFF(mY);
}
fmpz_set_ui(rel.Y, abslimb);
if (Ysz < 0)
fmpz_neg(rel.Y, rel.Y);
}
else
{
Expand Down

0 comments on commit be04d86

Please sign in to comment.