Skip to content

Commit

Permalink
Add prime_factor, is_prime, is_composite in prep for p3 (3)
Browse files Browse the repository at this point in the history
  • Loading branch information
LivInTheLookingGlass committed Oct 3, 2024
1 parent cd9a8fb commit 51e40fa
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions fortran/src/include/primes.f90
Original file line number Diff line number Diff line change
Expand Up @@ -109,11 +109,9 @@ integer(i18t) function is_composite(num) result(factor)
endif
end function

logical(i18t) function is_prime(num) result(ip)
logical function is_prime(num) result(ip)
integer(i18t), intent(in) :: num
integer(i18t) check
logical :: ip
localnum = num
if (num < 2) then
ip = .false.
elseif (num <= 3) then
Expand Down

0 comments on commit 51e40fa

Please sign in to comment.