Skip to content

Commit

Permalink
Attempt p7 in fortran (15)
Browse files Browse the repository at this point in the history
  • Loading branch information
LivInTheLookingGlass committed Oct 3, 2024
1 parent 03e9d29 commit 56a1a96
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fortran/src/include/primes.f90
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ subroutine sieve_up_to(n)
integer, intent(in) :: n
integer :: p, i, limit

limit = int(sqrt(real(n)))
limit = ceiling(sqrt(real(n)))
do p = 2, limit
if (get_prime_bit(p)) then
do i = p * p, n, p
Expand Down

0 comments on commit 56a1a96

Please sign in to comment.