Data update
This commit is contained in:
parent
8e4e15fa56
commit
72eb4943cb
1853 changed files with 35514 additions and 9441 deletions
|
|
@ -0,0 +1,34 @@
|
|||
module Modified_random_distribution (f, m, bins){
|
||||
form 60, 32
|
||||
Cls 1, 0
|
||||
Report "Modified Random Distribution"
|
||||
Cls 0, 1
|
||||
Cursor 0, 5
|
||||
T$="Range Istogram"
|
||||
Print #f, T$
|
||||
Print T$
|
||||
double a[bins]
|
||||
def modifier(x) = if(x < 0.5-> 1-2*x, 2*x -1)
|
||||
for i=1 to m
|
||||
while True:
|
||||
random1 = rnd
|
||||
random2 = rnd
|
||||
if random2 < modifier(random1) then
|
||||
answer = int(random1*bins)
|
||||
a[answer]++
|
||||
exit
|
||||
end if
|
||||
end while
|
||||
next
|
||||
b=100 / bins
|
||||
|
||||
for i=0 to bins-1
|
||||
L$=format$("{0:1:-4} - {1:1:-4} {2} {3}% ",i*b,(i+1)*b-.1, string$("*",a[i]/(m/bins)*20), round(a[i]/m*100,2))
|
||||
Print #f, L$
|
||||
Print L$
|
||||
next
|
||||
}
|
||||
// Ansi file / use for wide output for UTF16LE
|
||||
Open "ModRandomDistr.txt" for output as #f
|
||||
Modified_random_distribution f, 10000, 21
|
||||
close #f
|
||||
Loading…
Add table
Add a link
Reference in a new issue