Skip to content

Commit

Permalink
Update Mlucas.c
Browse files Browse the repository at this point in the history
Substitute printing PRP_base in ASSERT with actual value by using cbuf.
  • Loading branch information
xanthe-cat authored Apr 23, 2024
1 parent 4341a7e commit 585a79c
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/Mlucas.c
Original file line number Diff line number Diff line change
Expand Up @@ -5267,7 +5267,10 @@ 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);
ASSERT(HERE, mi64_getlen(pow,4) == k && mi64_cmp_eq(pow,rem,k), "Full-residue == PRP_base^nsquares (mod q) check fails!");
if (mi64_getlen(pow,4) == k && mi64_cmp_eq(pow,rem,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);
}
}
}
#if 0
Expand Down

0 comments on commit 585a79c

Please sign in to comment.