Commit 1c4219a9 authored by Rongjiang Wang's avatar Rongjiang Wang Committed by Sebastian Heimann
Browse files

fixes a numerical issue

parent b19c2fac
......@@ -38,9 +38,16 @@ c
fn=ca
cy=fn
100 i=i+1
ca=(1.d0,0.d0)/dcmplx(dble((2*(n-i)+1)*i),0.d0)
gn=gn*cxb2*ca
fn=gn+fn*cxa2*ca
c
c ca=(1.d0,0.d0)/dcmplx(dble((2*(n-i)+1)*i),0.d0)
c gn=gn*cxb2*ca
c fn=gn+fn*cxa2*ca
c
c corrected by R. Wang on 24.11.2016
c
ca=(1.d0,0.d0)/dcmplx(dble((2*(i-n)+1)*i),0.d0)
gn=-gn*cxb2*ca
fn=gn-fn*cxa2*ca
cy=cy+fn
if(cdabs(fn).gt.eps*cdabs(cy))goto 100
spbdphy=cy
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment