ВУЗ:
Составители:
Рубрика:
73
f=1
for j=1 to 2*n-1
c(j)=c(j)+f
f=f*x(i)
if j<=n then
b(j)=b(j)+r
r=r*x(i)
end if
next j
next i
for i=1 to n
k=i
for j=1 to n
am(i,j)=c(k)
k=k+1
next j
if ABS(am(i, i)) < 1E-35 then
over = -1
exit for
end if
next i
'Решение системы линейных уравнений методом Гаусса:
if NOT over then
for i=1 to n-1
for j=i+1 to n
if ABS(am(i, i)) < 1E-35 then
over = -1
exit for
end if
am(j,i)=-am(j,i)/am(i,i)
for k=i+1 to n
am(j,k)=am(j,k)+am(j,i)*am(i,k)
next k
b(j)=b(j)+am(j,i)*b(i)
next j
next i
for i=1 to n
if ABS(am(i, i)) < 1E-35 then over = -1
next i
end if
if NOT over then
a(n-1)=b(n)/am(n,n)
for i=n-1 to 1 step -1
73 f=1 for j=1 to 2*n-1 c(j)=c(j)+f f=f*x(i) if j<=n then b(j)=b(j)+r r=r*x(i) end if next j next i for i=1 to n k=i for j=1 to n am(i,j)=c(k) k=k+1 next j if ABS(am(i, i)) < 1E-35 then over = -1 exit for end if next i 'Решение системы линейных уравнений методом Гаусса: if NOT over then for i=1 to n-1 for j=i+1 to n if ABS(am(i, i)) < 1E-35 then over = -1 exit for end if am(j,i)=-am(j,i)/am(i,i) for k=i+1 to n am(j,k)=am(j,k)+am(j,i)*am(i,k) next k b(j)=b(j)+am(j,i)*b(i) next j next i for i=1 to n if ABS(am(i, i)) < 1E-35 then over = -1 next i end if if NOT over then a(n-1)=b(n)/am(n,n) for i=n-1 to 1 step -1