4subroutine c_pbe(beta,rs,z,t,uu,vv,ww,ec,vcup,vcdn)
7real(8),
intent(in) :: beta,rs,z,t,uu,vv,ww
8real(8),
intent(out) :: ec,vcup,vcdn
10real(8),
parameter :: thrd=1.d0/3.d0
11real(8),
parameter :: thrdm=-thrd
12real(8),
parameter :: thrd2=2.d0*thrd
13real(8),
parameter :: thrd4=4.d0*thrd
14real(8),
parameter :: sixthm=thrdm/2.d0
15real(8),
parameter :: gam=0.5198420997897463295d0
16real(8),
parameter :: fzz=8.d0/(9.d0*gam)
17real(8),
parameter :: gamma=0.0310906908696548950d0
18real(8),
parameter :: eta=1.d-12
19real(8) rtrs,eu,eurs,ep,eprs,alfm,alfrsm,z4,f
20real(8) ecrs,fz,ecz,comm,g,g3,pon,b,b2,t2,t4
21real(8) q4,q5,g4,t6,rsthrd,gz,fac,bg,bec,q8,q9
22real(8) hb,hrs,fact0,fact1,hbt,hrst,hz,ht,hzt
23real(8) fact2,fact3,htt,pref,fact5,h,dvcup,dvcdn
27call c_pbe_gcor(0.0310907d0,0.21370d0,7.5957d0,3.5876d0,1.6382d0,0.49294d0, &
29call c_pbe_gcor(0.01554535d0,0.20548d0,14.1189d0,6.1977d0,3.3662d0,0.62517d0, &
31call c_pbe_gcor(0.0168869d0,0.11125d0,10.357d0,3.6231d0,0.88026d0,0.49671d0, &
34f=((1.d0+z)**thrd4+(1.d0-z)**thrd4-2.d0)/gam
36ec=eu*(1.d0-f*z4)+ep*f*z4-alfm*f*(1.d0-z4)/fzz
37ecrs=eurs*(1.d0-f*z4)+eprs*f*z4-alfrsm*f*(1.d0-z4)/fzz
38fz=thrd4*((1.d0+z)**thrd-(1.d0-z)**thrd)/gam
39ecz=4.d0*(z**3)*f*(ep-eu+alfm/fzz)+fz*(z4*ep-z4*eu-(1.d0-z4)*alfm/fzz)
40comm=ec-rs*ecrs/3.d0-z*ecz
44g=((1.d0+z)**thrd2+(1.d0-z)**thrd2)/2.d0
54h=g3*(beta/delt)*log(1.d0+delt*q4*t2/q5)
58gz=(((1.d0+z)**2+eta)**sixthm-((1.d0-z)**2+eta)**sixthm)/3.d0
60bg=-3.d0*b2*ec*fac/(beta*g4)
64hb=-beta*g3*b*t6*(2.d0+b*t2)/q8
65hrs=-rsthrd*hb*bec*ecrs
68hbt=2.d0*beta*g3*t4*((q4*q5*fact0-delt*fact1)/q8)/q8
69hrst=rsthrd*t2*hbt*bec*ecrs
70hz=3.d0*gz*h/g+hb*(bg*gz+bec*ecz)
72hzt=3.d0*gz*ht/g+hbt*(bg*gz+bec*ecz)
73fact2=q4*q5+b*t2*(q4*q9+q5)
74fact3=2.d0*b*q5*q9+delt*fact2
75htt=4.d0*beta*g3*t*(2.d0*b/q8-(q9*fact3/q8)/q8)
76comm=h+hrs+hrst+t2*ht/6.d0+7.d0*t2*t*htt/6.d0
78fact5=gz*(2.d0*ht+t*htt)/g
79comm=comm-pref*z-uu*htt-vv*ht-ww*(hzt-fact5)