10
0
mirror of https://github.com/QuantumPackage/qp2.git synced 2024-06-26 15:12:19 +02: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,9 +1,12 @@
real*8 function logabsgamma(x)
implicit none
real*8, intent(in) :: x
logabsgamma = log(abs(gamma(x)))
logabsgamma = 1.d32 ! Avoid floating point exception
if (x>0.d0) then
logabsgamma = log(abs(gamma(x)))
endif
end function logabsgamma
BEGIN_PROVIDER [ integer, NSOMOMax]
&BEGIN_PROVIDER [ integer, NCSFMax]
&BEGIN_PROVIDER [ integer*8, NMO]