Skip to content

Commit

Permalink
Attempt p7 in fortran (8)
Browse files Browse the repository at this point in the history
  • Loading branch information
LivInTheLookingGlass committed Oct 3, 2024
1 parent 204da7a commit d80a3a6
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions fortran/src/include/primes.f90
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,9 @@ subroutine expand_sieve(potential_n)
call initialize_sieve(max(new_n, 1024))

new_size = (new_n / bits_per_int) + 1
if (allocated(is_prime)) then
deallocate(is_prime)
end if
allocate(is_prime(new_size))
is_prime = -1 ! All bits set to 1
call clear_prime_bit(0)
Expand Down

0 comments on commit d80a3a6

Please sign in to comment.