summaryrefslogtreecommitdiff
path: root/fpcdocs/mathex/ex43.pp
blob: 64d366ad296e7446b1e7d6a6e71525d344320f45 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
Program Example40;

{ Program to demonstrate the stddev function. }

Uses Math;

Var
  I : Integer;
  ExArray : Array[1..10000] of Float;

begin
  Randomize;
  for I:=low(ExArray) to high(ExArray) do
    ExArray[i]:=Randg(1,0.2);
  Writeln('StdDev     : ',StdDev(ExArray):8:4);
  Writeln('StdDev (b) : ',StdDev(@ExArray[0],10000):8:4);
end.