read('s17odr8Eq'):
read('c7fixed');
read('dc23458overdc7');
read('iterndc23458');
#
#  Change Digits to whatever precision you like.
#
#  Warning: In iteration routine MyItern, eps is set to
#
#               10^(-Digits+20).
#
#           This may be too conservative, but asure us
#           every iteration improves solution. To get
#           the final solution with the desired precision,
#           you need to set Digits to at least to
#
#               the desired precision + 20.
#
#                                        Ren-Cang Li, June 1, 1996
#                                        na.rcli@na-net.ornl.gov

Digits:=100: DumpDigits:=20:
print(`Initial Guess interval is`);
x0L:=vector([0.127411219153790195, 0.689023630673156640, 
             0.305916633924629811, 0.465897067930040321,
             0.0646012280927329291, 0.251702061039965064,
             0.802990952480505116]);
c70L:=0.512213758791078555;
x0U:=vector([0.126760289744704630, 0.688598528326399451, 
             0.306835464617257414, 0.467038260924854509, 
             0.0645097045367594296, 0.252245756907545970, 
             0.803106809119269904]);
c70U:=0.513221423227661844;

print(`Start the computational engine`);
xM:=randvector(7): 
c7M:=c23458Itern(x0L,c70L,x0U,c70U,xM):

#
# So we get a solution c0':
#
c0:=vector(8):
for i from 1 to 6 do c0[i]:=xM[i]: od:
c0[7]:=c7M: c0[8]:=xM[7]:

delta0:=vector(9):
delta0[1]:=c0[1]:
for i from 2 to 8 do delta0[i]:=c0[i]-c0[i-1]: od:
delta0[9]:=1-2*c0[8]:

#
#  To verify that the computed solution by computing
#  the residual error of determining equations.
#
read('ToCheck');
ResiErr(c0);
#
#  Dump solutions to DumpDigits decimal digits.
#
print(`Output the computed solution to s17odr8b`);
readlib(write):
appendto(s17odr8b):
writeln():
write(`Delta's:`): writeln():
write(`=======`): writeln():
writeln():
for i from 1 to 9 do
    write(evalf(delta0[i],DumpDigits)); writeln();
od:
writeln():
write(`C's:`): writeln():
write(`===`): writeln():
writeln():
for i from 1 to 8 do
    write(evalf(c0[i],DumpDigits)); writeln();
od:
close():
