Skip to content

Commit

Permalink
Update Mlucas.c
Browse files Browse the repository at this point in the history
The if condition needed to be inverted, we want to possibly invoke an ASSERT if we do not have equality.
  • Loading branch information
xanthe-cat authored Apr 24, 2024
1 parent 4b435c8 commit e336c6a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Mlucas.c
Original file line number Diff line number Diff line change
Expand Up @@ -5267,9 +5267,9 @@ int read_ppm1_savefiles(const char*fname, uint64 p, uint32*kblocks, FILE*fp, uin
// Raise PRP base (usually but not always 3) to the just-computed power; result in 4-limb local-array pow[]:
mi64_scalar_modpow_lr(PRP_BASE, exp, KNOWN_FACTORS+i, j, pow);
sprintf(cstr,"\tB: R == %s (mod q)\n",&cbuf[convert_mi64_base10_char(cbuf, pow, j, 0)] ); mlucas_fprint(cstr,1);
if (mi64_getlen(pow,4) == k && mi64_cmp_eq(pow,rem,k)) {
if (mi64_getlen(pow,4) != k) {
snprintf_nowarn(cbuf,STR_MAX_LEN,"Full-residue == %lu^nsquares (mod q) check fails!", PRP_BASE); mlucas_fprint(cbuf,0);
ASSERT(HERE, 0, cbuf);
ASSERT(HERE, mi64_getlen(pow,4) == k && mi64_cmp_eq(pow,rem,k), cbuf);
}
}
}
Expand Down

0 comments on commit e336c6a

Please sign in to comment.