Changes from branches/FLEXPART_9.1.3/src/erf.f90 at r13 to trunk/src/erf.f90 at r4
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/erf.f90
- Property svn:executable set to *
r13 r4 42 42 43 43 integer :: j 44 real (kind=dp):: x,tmp,ser,xx,gammln45 real (KIND=dp):: cof(6) = (/ &44 real :: x,tmp,ser,xx,gammln 45 real :: cof(6) = (/ & 46 46 76.18009173_dp, -86.50532033_dp, 24.01409822_dp, & 47 47 -1.231739516_dp, .120858003e-2_dp, -.536382e-5_dp /) 48 real (KIND=dp):: stp = 2.50662827465_dp49 real (KIND=dp):: half = 0.5_dp, one = 1.0_dp, fpf = 5.5_dp48 real :: stp = 2.50662827465_dp 49 real :: half = 0.5_dp, one = 1.0_dp, fpf = 5.5_dp 50 50 51 51 x=xx-one … … 62 62 function gammp(a,x) 63 63 64 use par_mod, only: dp 65 66 implicit none 67 68 real(KIND=dp) :: a, x, gln, gamser, gammp, gammcf 64 implicit none 65 66 real :: a, x, gln, gamser, gammp, gammcf 69 67 70 68 if(x .lt. 0. .or. a .le. 0.) then … … 83 81 function gammq(a,x) 84 82 85 use par_mod, only: dp 86 87 implicit none 88 89 real(KIND=dp) :: a, x, gln, gamser, gammq, gammcf 83 implicit none 84 85 real :: a, x, gln, gamser, gammq, gammcf 90 86 91 87 if(x.lt.0..or.a.le.0.) then … … 104 100 subroutine gser(gamser,a,x,gln) 105 101 106 use par_mod, only: dp107 108 102 implicit none 109 103 110 104 integer :: n 111 real (KIND=dp):: gamser, a, x, gln, ap, summ, del112 real (KIND=dp), external :: gammln105 real :: gamser, a, x, gln, ap, summ, del 106 real, external :: gammln 113 107 114 108 integer,parameter :: itmax=100 … … 140 134 subroutine gcf(gammcf,a,x,gln) 141 135 142 use par_mod, only: dp143 144 136 implicit none 145 137 146 138 integer :: n 147 real (KIND=4) :: gammcf, x, a, gln, gold, a0, a1, b0, b1, fac, an, anf, ana, g148 real (KIND=dp), external :: gammln139 real :: gammcf, a, x, gln, gold, a0, a1, b0, b1, fac, an, anf, ana, g 140 real, external :: gammln 149 141 150 142 integer,parameter :: itmax=100 … … 180 172 function erf(x) 181 173 182 use par_mod, only: dp 183 184 implicit none 185 186 real(KIND=dp) :: x, erf 187 real(KIND=dp), external :: gammp 174 implicit none 175 176 real :: x, erf 177 real, external :: gammp 188 178 189 179 if(x.lt.0.)then … … 196 186 function erfc(x) 197 187 198 use par_mod, only: dp 199 200 implicit none 201 202 real(KIND=dp) :: x, erfc 203 real(KIND=dp), external :: gammp, gammq 188 implicit none 189 190 real :: x, erfc 191 real, external :: gammp, gammq 204 192 205 193 if(x.lt.0.)then … … 212 200 function erfcc(x) 213 201 214 use par_mod, only: dp 215 216 implicit none 217 218 real(KIND=dp) :: x, z, t, erfcc 202 implicit none 203 204 real :: x, z, t, erfcc 219 205 220 206 z=abs(x)
Note: See TracChangeset
for help on using the changeset viewer.