read('s17odr8Eq'):
read('c7fixed');
read('dc8overdc7');
read('iterndc8');
#
#  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.130544674703023000, 0.691718589057751521, 
             0.301387190338290256, 0.460068391451766867,
             0.0648380336263533613, 0.249080556127446617,
             0.802758241393777383]);
c70L:=0.507175436608162111;
x0U:=vector([0.129934742325489905, 0.691100172054480932, 
             0.302282790207390462, 0.461247211682169700, 
             0.0648183050388493887, 0.249592771339640557,
             0.802756644316879431]);
c70U:=0.508183101044745400;

print(`Start the computational engine`);
xM:=vector(7): 
c7M:=c8Itern(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 s17odr8a`);
readlib(write):
appendto(s17odr8a):
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():
