program test_fermi include 'implno.dek' c..declare double precision x,ans(9),exact(9), 1 zfermim12,zfermi12,zfermi1,zfermi32, 2 zfermi2,zfermi52,zfermi3,fermi4,fermi5, 3 theta,fdeta,fdtheta c..evaluate the rational function fits of the fermi integrals c..in physical terms x is chemical potantial dividedd by kerg*temp x = 0.4d0 ans(1) = zfermim12(x) ans(2) = zfermi12(x) ans(3) = zfermi1(x) ans(4) = zfermi32(x) ans(5) = zfermi2(x) ans(6) = zfermi52(x) ans(7) = zfermi3(x) ans(8) = fermi4(x) ans(9) = fermi5(x) c..evaluate the exact fermi integrals by using the more general c..fermi-dirac integrals with theta (rest mass energy divided by kerg*temp) c..equal to zero theta = 0.0d0 call dfermi(-0.5d0,x,theta,exact(1),fdeta,fdtheta) call dfermi(0.5d0,x,theta,exact(2),fdeta,fdtheta) call dfermi(1.0d0,x,theta,exact(3),fdeta,fdtheta) call dfermi(1.5d0,x,theta,exact(4),fdeta,fdtheta) call dfermi(2.0d0,x,theta,exact(5),fdeta,fdtheta) call dfermi(2.5d0,x,theta,exact(6),fdeta,fdtheta) call dfermi(3.0d0,x,theta,exact(7),fdeta,fdtheta) call dfermi(4.0d0,x,theta,exact(8),fdeta,fdtheta) call dfermi(5.0d0,x,theta,exact(9),fdeta,fdtheta) c..say what we got write(6,110) 'fermi integrals at x =',x 110 format(1x,a,1pe12.4) write(6,111) 'rational approximation','exact quadrature' 111 format(1x,t16,a,t42,a) write(6,112) ans(1),exact(1),ans(2),exact(2),ans(3),exact(3), 1 ans(4),exact(4),ans(5),exact(5),ans(6),exact(6), 2 ans(7),exact(7),ans(8),exact(8),ans(9),exact(9) 112 format(1x,'order -1/2 :',1p2e24.16,/, 1 1x,'order 1/2 :',1p2e24.16,/, 2 1x,'order 1 :',1p2e24.16,/, 3 1x,'order 3/2 :',1p2e24.16,/, 4 1x,'order 2 :',1p2e24.16,/, 5 1x,'order 5/2 :',1p2e24.16,/, 6 1x,'order 3 :',1p2e24.16,/, 7 1x,'order 4 :',1p2e24.16,/, 8 1x,'order 5 :',1p2e24.16) stop 'normal termination' end c..routines for the rational function fits include 'funct_fermi1.f' include 'funct_fermi45.f' include 'interp_spline1.f' c..routines for the brutally efficient quadrature integrations include 'gauss_fermi.f'