Реферат: Моделирование ЭВМ
x2:=sqrt(2)*x2+17;
end;
procedure norm3(var x1,x2:real);
begin
z1:=random;
z2:=random;
x1:=sqrt(-2*ln(z1))*cos(2*pi*z2);
x2:=sqrt(-2*ln(z1))*sin(2*pi*z2);
x1:=sqrt(2)*x1+18;
x2:=sqrt(2)*x2+18;
end;
procedure expon (a:real ; var x: real);
begin
z1:=random;
x:=-(1/a)*ln(z1);
x:=sqrt(1/sqr(a))*x+0.8;
end;
Begin
clrscr;
assign(f1,'d:\tp\norm-1.dat');
rewrite(f1);
assign(f3,'d:\tp\norm-2.dat');
rewrite(f3);
assign(f4,'d:\tp\norm-3.dat');
rewrite(f4);
writeln(' Нормальный закон:');
for i:=1 to 500 do
begin
norm1(y1,y2); write(f1,y1,' ');write(f1,y2,' ');