|
|
DataMuseum.dkPresents historical artifacts from the history of: RC4000/8000/9000 |
This is an automatic "excavation" of a thematic subset of
See our Wiki for more about RC4000/8000/9000 Excavated with: AutoArchaeologist - Free & Open Source Software. |
top - metrics - download
Length: 1536 (0x600)
Types: TextFile
Names: »imp«
└─⟦667bb35d6⟧ Bits:30007480 RC8000 Dump tape fra HCØ.
└─⟦4334b4c0b⟧
└─⟦this⟧ »imp«
logical function improv(ndim,n,a,lu,b,x,r,ipvt,digits)
real a(ndim,ndim),lu(ndim,ndim),b(ndim),x(ndim),r(ndim)
real t,rnorm,ra,eps,norm
integer ipvt(ndim),i,j,itmax,te,ndim,n
external out
zone out
c uses abs(), amax1(), alog10()
double precision sum,aij,xj
improv = .true.
c
eps = 1.0
10 eps = 0.5*eps
ra = eps+1.0
if (ra .gt. 1.0) goto 10
itmax=2*alog10(1/eps)
write(out,500) te,ra,eps,itmax
500 format(1h ,3e15.3,i5)
c *** eps and itmax are maschine dependent. ***
c
norm = 0.0
do 1 i = 1,n
1 norm = amax1(norm,abs(x(i)))
if (norm .ne. 0.0) goto 12
digets =-alog10(eps)
return
c
12 do 6 iter = 1,itmax
do 4 i = 1,n
sum = 0.0
do 3 j = 1,n
xj=x(j)
aij=a(i,j)
sum = sum + (a(i,j))*(x(j))
3 continue
sum = b(i) -sum
r(i) = sum
4 continue
c *** it is essential that a(i,j)*x(j) yield a double precision
c result and that the above + and - be double precision. ***
call solve (ndim,n,lu,r,ipvt)
rnorm = 0.0
do 5 i = 1,n
t = x(i)
x(i) = x(i) + r(i)
rnorm = amax1(rnorm,abs(x(i)-t))
5 continue
digits = -alog10(amax1(rnorm/norm,eps))
if (rnorm .le. eps*norm) return
6 continue
c iteration did not convergenge
improv = .true.
return
end
▶EOF◀