9
1
mirror of https://github.com/QuantumPackage/qp2.git synced 2024-12-22 03:23:29 +01:00

Fix floating-point exception

This commit is contained in:
Anthony Scemama 2021-11-17 09:02:26 +01:00
parent 7edfd4e326
commit d6542e62a3

View File

@ -1,7 +1,10 @@
real*8 function logabsgamma(x) real*8 function logabsgamma(x)
implicit none implicit none
real*8, intent(in) :: x real*8, intent(in) :: x
logabsgamma = 1.d32 ! Avoid floating point exception
if (x>0.d0) then
logabsgamma = log(abs(gamma(x))) logabsgamma = log(abs(gamma(x)))
endif
end function logabsgamma end function logabsgamma
BEGIN_PROVIDER [ integer, NSOMOMax] BEGIN_PROVIDER [ integer, NSOMOMax]