COSMOS v7.655
COSMOSv7655
(AirShowerMC)
Main Page
Related Pages
+
Modules
Modules List
+
Module Members
+
All
a
b
c
d
e
f
g
h
k
l
m
n
o
p
r
s
t
u
x
+
Functions/Subroutines
c
g
m
o
+
Variables
a
b
c
d
e
f
g
h
k
l
m
n
p
r
s
t
u
x
+
Data Types List
Data Types List
+
Data Fields
+
All
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
u
v
w
x
y
z
+
Variables
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
u
v
w
x
y
z
+
Files
File List
+
File Members
+
All
!
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
+
Functions/Subroutines
!
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
w
x
y
z
+
Variables
!
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Typedefs
+
Macros
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
u
w
x
y
z
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Macros
Pages
kcossn.f
Go to the documentation of this file.
1
! testing kcossn
2
! include 'rnd.f'
3
! ---------------
4
! implicit none
5
! integer i
6
! real*8 cs, sn
7
! do i=1, 50000
8
! call kcossn(cs, sn)
9
! write(*, *) sngl(asin(sn))
10
! enddo
11
! end
12
subroutine
kcossn
(cs,sn)
13
! to generate cos(phy),sin(phy), where phy is uniform in (0,2pi).
14
! reuired subprogram. rndc
15
implicit none
16
real*8
cs, sn
17
!
18
real*8
u, v, a, b, c
19
c = 5.
d0
20
21
do
while
(c .gt. 1.
d0
)
22
call
rndc
(u)
23
call
rndc
(v)
24
v=v+v-1.
25
a=u*u
26
b=v*v
27
c=a+b
28
enddo
29
30
cs=(a-b)/c
31
sn=2.*u*v/c
32
end
rndc
subroutine rndc(u)
Definition:
rnd.f:91
d0
block data cblkEvhnp ! currently usable models data RegMdls ad *special data *Cekaon d0
Definition:
cblkEvhnp.h:5
kcossn
subroutine kcossn(cs, sn)
Definition:
kcossn.f:13
KKlib
kcossn.f
Generated by
1.8.13