Skip to content

fix(factorial): result should be of the default kind, not double default kind #876

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Oct 6, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Promote real to real_dp as it should be
  • Loading branch information
Cyril Gandon committed Sep 27, 2024
commit a65cc2f2da275bb94a04bae3c5957d16cf018504
8 changes: 4 additions & 4 deletions src/stdlib_specialfunctions_gamma.fypp
Original file line number Diff line number Diff line change
Expand Up @@ -528,9 +528,9 @@ contains
! Log(n!)
!
${t1}$, intent(in) :: n
real :: res
real(dp) :: res
${t1}$, parameter :: zero = 0_${k1}$, one = 1_${k1}$, two = 2_${k1}$
real, parameter :: zero_k2 = 0.0
real(dp), parameter :: zero_dp = 0.0_dp

if(n < zero) call error_stop("Error(l_factorial): Logarithm of" &
//" factorial function argument must be non-negative")
Expand All @@ -539,11 +539,11 @@ contains

case (zero)

res = zero_k2
res = zero_dp

case (one)

res = zero_k2
res = zero_dp

case (two : )

Expand Down
Loading