相关代码 |
|
procedure DDPOLY(C:array of real; NC:integer; X:real; var PD:array of real; ND:integer); var J,I,NND:integer; CONST1:real; begin PD[1]:=C[NC]; For J:=2 To ND do PD[J]:=0; For I:=NC - 1 downTo 1 do begin If NC + 1 - I < ND Then NND:=NC + 1 - I Else NND:=ND; For J:=NND DownTo 2 do begin PD[J]:=PD[J] * X + PD[J - 1]; end; PD[1]:=PD[1] * X + C[I]; end; CONST1:=2 ; For I:=3 To ND do begin PD[I]:=CONST1 * PD[I]; CONST1:=CONST1 * I; end; end;