delphi数值算法集光盘源代码,用于delphi7科学出版社出版.
源代码在线查看: qgaus.txt
procedure QGAUS(A, B:real;var SS:real);
var
X, W:array[0..5] of real;
XM,XR,DX:real; J:integer;
begin
X[1]:=0.1488743389; X[2]:=0.4333953941;
X[3]:=0.6794095682; X[4]:=0.8650633666;
X[5]:=0.9739065285;
W[1]:=0.2955242247; W[2]:=0.2692667193;
W[3]:=0.2190863625; W[4]:=0.1494513491;
W[5]:=0.0666713443;
XM:=0.5 * (A + B);
XR:=0.5 * (B - A);
SS:=0;
For J:=1 To 5 do
begin
DX:=XR * X[J];
SS:=SS + W[J] * (FUNC(XM + DX) + FUNC(XM - DX));
end;
SS:=XR * SS;
end;