42 integer,
intent(in) :: number
43 character(10) :: integer_to_string
45 write( integer_to_string,
'(i10)' ) number
47 integer_to_string = trim(adjustl( integer_to_string ))
58 character(len=*) :: name
60 write(*,
'(a)')
"**************************************************************"
61 write(*,
'(a)')
" _____ _ _____ __ "
62 write(*,
'(a)')
" / ___/__ ___ __ _ (_)___/ __(_)__ / / "
63 write(*,
'(a)')
" / /__/ _ \(_-</ ' \/ / __/ _// (_-</ _ \ "
64 write(*,
'(a)')
" \___/\___/___/_/_/_/_/\__/_/ /_/___/_//_/ "
66 write(*,
'(a)')
"**************************************************************"
68 write(*,
'(a)')
" This application was developed using the CosmicFish code."
69 write(*,
'(a)')
"**************************************************************"
80 real(dl),
intent(in) :: y
83 real(dl) :: s,t,u,w,x,z,y_temp
85 real(dl),
parameter :: &
86 & qa = 9.16461398268964d-01, &
87 & qb = 2.31729200323405d-01, &
88 & qc = 4.88826640273108d-01, &
89 & qd = 1.24610454613712d-01, &
90 & q0 = 4.99999303439796d-01, &
91 & q1 = 1.16065025341614d-01, &
92 & q2 = 1.50689047360223d-01, &
93 & q3 = 2.69999308670029d-01, &
94 & q4 = -7.28846765585675d-02
96 real(dl),
parameter :: &
97 & pa = 3.97886080735226000d+00, &
98 & pb = 1.20782237635245222d-01, &
99 & p0 = 2.44044510593190935d-01, &
100 & p1 = 4.34397492331430115d-01, &
101 & p2 = 6.86265948274097816d-01, &
102 & p3 = 9.56464974744799006d-01, &
103 & p4 = 1.16374581931560831d+00, &
104 & p5 = 1.21448730779995237d+00, &
105 & p6 = 1.05375024970847138d+00, &
106 & p7 = 7.13657635868730364d-01, &
107 & p8 = 3.16847638520135944d-01, &
108 & p9 = 1.47297938331485121d-02, &
109 & p10 = -1.05872177941595488d-01, &
110 & p11 = -7.43424357241784861d-02
112 real(dl),
parameter :: &
113 & p12 = 2.20995927012179067d-03, &
114 & p13 = 3.46494207789099922d-02, &
115 & p14 = 1.42961988697898018d-02, &
116 & p15 = -1.18598117047771104d-02, &
117 & p16 = -1.12749169332504870d-02, &
118 & p17 = 3.39721910367775861d-03, &
119 & p18 = 6.85649426074558612d-03, &
120 & p19 = -7.71708358954120939d-04, &
121 & p20 = -3.51287146129100025d-03, &
122 & p21 = 1.05739299623423047d-04, &
123 & p22 = 1.12648096188977922d-03
130 if (y_temp .gt. 1) z = 2 - y_temp
133 s = (qc + log(u)) / w
135 x = u * (1 - s * (0.5d0 + s * qd)) - &
136 & ((((q4 * t + q3) * t + q2) * t + q1) * t + q0) * t
139 s = (((((((((p22 * u + p21) * u + p20) * u + &
140 & p19) * u + p18) * u + p17) * u + p16) * u + &
141 & p15) * u + p14) * u + p13) * u + p12
142 s = ((((((((((((s * u + p11) * u + p10) * u + &
143 & p9) * u + p8) * u + p7) * u + p6) * u + p5) * u + &
144 & p4) * u + p3) * u + p2) * u + p1) * u + p0) * t - &
145 & z * exp(x * x - pb)
146 x = x + s * (1 + x * s)
147 if (y_temp .gt. 1) x = -x
subroutine, public cosmicfish_write_header(name)
This subroutine writes to the terminal the CosmicFish header. To be called at the beginning of the ap...
real(dl) function, public dierf(y)
This function computes the inverse error function in double precision. Taken from: http://www...
This module contains several general purpose utilities.
character(10) function, public integer_to_string(number)
This function converts an integer to a string. Usefull for numbered files output. ...