diff --git a/helper.c b/helper.c index deff16c..d824b50 100644 --- a/helper.c +++ b/helper.c @@ -37,7 +37,6 @@ uint64_t rand64() { // Stitch two 64-bit random numbers into a 128-bit number unsigned __int128 generate_stitched_128() { - // Make sure to seed rand() in your main function with srand(time(NULL)) uint64_t top_half = rand64(); uint64_t bottom_half = rand64(); @@ -48,10 +47,9 @@ unsigned __int128 generate_stitched_128() { } unsigned __int128 generate_prime_candidate() { - // 1. Get the raw random bytes unsigned __int128 candidate = generate_stitched_128(); - // 2. Force the bottom bit to 1 (Ensures it is odd) + // Force the bottom bit to 1, this will make all generated primes odd candidate = candidate | 1; // 3. Force the top bit to 1 (Ensures it is a full 128-bit number)