unit DemoForm; interface uses  Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,  StdCtrls; type  TForm1 = class(TForm)    Button1: TButton;    Memo1: TMemo;    Edit1: TEdit;    Label1: TLabel;    procedure Button1Click(Sender: TObject);  private    { Private declarations }  public    { Public declarations }  end; var  Form1: TForm1; implementation {$R *.DFM} uses cplx, cplxfft1, MMSystem; procedure TForm1.Button1Click(Sender: TObject); var  j: integer;  s: string;  src, dest: PScalars;  norm: extended;  d, N, count: integer;  st, et: longint; begin  d := StrToIntDef(edit1.text, -1);  if d < 1 then    raise      exception.Create('ãëóáèíà ðåêóðñèè äîëæíû áûòü ïîëîæèòåëüíûì öåëûì ÷èñëîì');  N := integer(1) shl d;  GetMem(Src, N * Sizeof(TScalar));  GetMem(Dest, N * SizeOf(TScalar));  for j := 0 to N - 1 do  begin    src^[j] := MakeComplex(random, random);  end;  begin    st := timeGetTime;    FFT(d, Src, dest);    et := timeGetTime;  end;  Memo1.Lines.Add('N = ' + IntToStr(N));  Memo1.Lines.Add('íîðìà îæèäàíèÿ: ' + #9 + FloatToStr(N * 2 / 3));  norm := 0;  for j := 0 to N - 1 do    norm := norm + AbsSquared(src^[j]);  Memo1.Lines.Add('Íîðìà äàííûõ: ' + #9 + FloatToStr(norm));  norm := 0;  for j := 0 to N - 1 do    norm := norm + AbsSquared(dest^[j]);  Memo1.Lines.Add('Íîðìà FT: ' + #9#9 + FloatToStr(norm));  Memo1.Lines.Add('Âðåìÿ ðàñ÷åòà FFT: ' + #9    + inttostr(et - st)    + ' ìñ.');  Memo1.Lines.Add(' ');  FreeMem(Src);  FreeMem(DEst); end; end.