We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1152f04 commit 8186eadCopy full SHA for 8186ead
src/tests/stats/test_distribution_uniform.fypp
@@ -70,18 +70,18 @@ program test_distribution_uniform
70
subroutine test_uni_rvs_0
71
integer, parameter :: num=10000000
72
integer, parameter :: array_size = 1000
73
- integer :: i, j, freq(0:array_size)
+ integer :: i, j, freq(0:array_size - 1)
74
real(dp) :: chisq, expct
75
76
print *,""
77
print *, "Test uniform random generator with chi-squared"
78
freq = 0
79
do i = 1, num
80
- j = 1000 * uni_rvs( )
+ j = array_size * uni_rvs( )
81
freq(j) = freq(j) + 1
82
end do
83
chisq = 0.0_dp
84
- expct = num / 1000
+ expct = num / array_size
85
do i = 0, array_size - 1
86
chisq = chisq + (freq(i) - expct) ** 2 / expct
87
0 commit comments