mirror of
https://github.com/QuantumPackage/qp2.git
synced 2024-12-22 20:34:58 +01:00
Merge pull request #172 from v1j4y/fixNcsfCalculation
Fix for `Floating-point exception` during the calculation of Ncsf
This commit is contained in:
commit
820e58c6fe
@ -56,6 +56,11 @@
|
|||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
ncfg = ncfgpersomo - ncfgprev
|
ncfg = ncfgpersomo - ncfgprev
|
||||||
|
if(i .EQ. 0 .OR. i .EQ. 1) then
|
||||||
|
dimcsfpercfg = 1
|
||||||
|
elseif( i .EQ. 3) then
|
||||||
|
dimcsfpercfg = 2
|
||||||
|
else
|
||||||
if(iand(MS,1) .EQ. 0) then
|
if(iand(MS,1) .EQ. 0) then
|
||||||
!dimcsfpercfg = max(1,nint((binom(i,i/2)-binom(i,i/2+1))))
|
!dimcsfpercfg = max(1,nint((binom(i,i/2)-binom(i,i/2+1))))
|
||||||
binom1 = dexp(logabsgamma(1.0d0*(i+1)) &
|
binom1 = dexp(logabsgamma(1.0d0*(i+1)) &
|
||||||
@ -75,6 +80,7 @@
|
|||||||
- logabsgamma(1.0d0*(i-(((i+3)/2)+1)+1)));
|
- logabsgamma(1.0d0*(i-(((i+3)/2)+1)+1)));
|
||||||
dimcsfpercfg = max(1,nint(binom1 - binom2))
|
dimcsfpercfg = max(1,nint(binom1 - binom2))
|
||||||
endif
|
endif
|
||||||
|
endif
|
||||||
n_CSF += ncfg * dimcsfpercfg
|
n_CSF += ncfg * dimcsfpercfg
|
||||||
if(cfg_seniority_index(i+2) > ncfgprev) then
|
if(cfg_seniority_index(i+2) > ncfgprev) then
|
||||||
ncfgprev = cfg_seniority_index(i+2)
|
ncfgprev = cfg_seniority_index(i+2)
|
||||||
|
Loading…
Reference in New Issue
Block a user