commit
0e67c5cd51
24
etc/pprime.c
24
etc/pprime.c
@ -39,18 +39,18 @@ static void gen_prime(void)
|
|||||||
if (out != NULL) {
|
if (out != NULL) {
|
||||||
|
|
||||||
/* write first set of primes */
|
/* write first set of primes */
|
||||||
/* *INDENT-OFF* */
|
/* *INDENT-OFF* */
|
||||||
r = 3; fwrite(&r, 1, sizeof(mp_digit), out);
|
r = 3; fwrite(&r, 1, sizeof(mp_digit), out);
|
||||||
r = 5; fwrite(&r, 1, sizeof(mp_digit), out);
|
r = 5; fwrite(&r, 1, sizeof(mp_digit), out);
|
||||||
r = 7; fwrite(&r, 1, sizeof(mp_digit), out);
|
r = 7; fwrite(&r, 1, sizeof(mp_digit), out);
|
||||||
r = 11; fwrite(&r, 1, sizeof(mp_digit), out);
|
r = 11; fwrite(&r, 1, sizeof(mp_digit), out);
|
||||||
r = 13; fwrite(&r, 1, sizeof(mp_digit), out);
|
r = 13; fwrite(&r, 1, sizeof(mp_digit), out);
|
||||||
r = 17; fwrite(&r, 1, sizeof(mp_digit), out);
|
r = 17; fwrite(&r, 1, sizeof(mp_digit), out);
|
||||||
r = 19; fwrite(&r, 1, sizeof(mp_digit), out);
|
r = 19; fwrite(&r, 1, sizeof(mp_digit), out);
|
||||||
r = 23; fwrite(&r, 1, sizeof(mp_digit), out);
|
r = 23; fwrite(&r, 1, sizeof(mp_digit), out);
|
||||||
r = 29; fwrite(&r, 1, sizeof(mp_digit), out);
|
r = 29; fwrite(&r, 1, sizeof(mp_digit), out);
|
||||||
r = 31; fwrite(&r, 1, sizeof(mp_digit), out);
|
r = 31; fwrite(&r, 1, sizeof(mp_digit), out);
|
||||||
/* *INDENT-ON* */
|
/* *INDENT-ON* */
|
||||||
|
|
||||||
/* get square root, since if 'r' is composite its factors must be < than this */
|
/* get square root, since if 'r' is composite its factors must be < than this */
|
||||||
y = i_sqrt(r);
|
y = i_sqrt(r);
|
||||||
|
Loading…
Reference in New Issue
Block a user