RANDOM NUMBER GENERATOR
Uniform On [0,1]
> restart:with(stats):
Generates 30 random numbers uniform on [0, 1].
> random[uniform[0,1]](30);
Generates 10 random numbers and sums the ones less then 1/2.
>
summ:=0.0:
for i from 1 to 10 do
***** x:=random[uniform[0,1]](1);
***** if x<=0.5 then summ:=summ+x;fi;
od;
`SUM_0.5_or_less`:=summ;