# testsuite_random_include section for BASIC256

# Modification History
# date		programmer	description
# 20140813	j.m.reneau	split from testsuite

clg
fastgraphics
min = rand
max = rand
tot = 0
k = 100000
for t = 1 to k
   n = rand
   if n < min then min = n
   if n > max then max = n
   tot = tot + n
   plot n*300,t%300
   if t%1000=0 then
      refresh
      color rgb(rand*256, rand*256, rand*256)
   end if
next t
tot = tot / k
call n("rand min "+min+">= 0..", min >=0, true)
call n("rand max "+max+"< 1", max < 1, true)
call n("rand avg "+tot+" ~ .5", tot>=.49 and tot<=.51, true)