primorial16bit.c (497B)
1 /** 2 * Precomputes the primorial of 2^16 (i.e. the product of all primes < 3 * 2^16). The result is printed to stdout. This is used to create the 4 * assets/primorial16b.bin file. 5 */ 6 #include <flint.h> 7 #include <fmpz.h> 8 #include <stdio.h> 9 #include <stdlib.h> 10 11 int 12 main(void) 13 { 14 fmpz_t primorial; 15 fmpz_init(primorial); 16 17 fmpz_primorial(primorial, 1 << 16); 18 19 if (fmpz_out_raw(stdout, primorial) == 0) { 20 fprintf(stderr, "Error! Writing to stdout failed.\n"); 21 exit(1); 22 } 23 24 return 0; 25 }