#                                        Ren-Cang Li, June 1, 1996
#                                        na.rcli@na-net.ornl.gov

read('s9odr6Eq'):
read('GetCritPt'):
read('ToCheck'):
readlib(write):

Digits:=100: DumpDigits:=20:

#
#  Get s9odr6a
#
print(`Compute s9odr6a`):
x0:=0.10: y0:=0.0187:
GetCritPt(x0,y0,'x1','y1'):
print(`Residual error as a critical point:`):
print(max( abs(subs(x=x1,y=y1,fxyh)), 
	   abs(subs(x=x1,y=y1,yfxyh)) )):
#
#  Finding corresponding z and w
#
z1:=solve(subs(x=x1,y=y1,f13)):
w1:=solve(subs(x=x1,y=y1,z=z1,fw1)):
xyzw1:=vector([x1,y1,z1,w1]):
#
#  To verify that the computed solution is correct.
#
ResiErr(xyzw1):

#
#  Output the solution.
#
appendto(s9odr6abcd): writeln():
write(`Scheme`): write(`a`): write(`:`): writeln():
write(`=============`): writeln():
read('WriteItOut'):
close():
#
#  Get s9odr6b
#
print(`Compute s9odr6b`):
read('get_s9odr6b'):
#
#  Finding corresponding w
#
w1:=solve(subs(x=x1,y=y1,z=z1,fw1)):
xyzw1:=vector([x1,y1,z1,w1]):
#
#  To verify that the computed solution is correct.
#
ResiErr(xyzw1):

#
#  Output the solution.
#
appendto(s9odr6abcd): writeln():
write(`Scheme`): write(`b`): write(`:`): writeln():
write(`=============`): writeln(): 
read('WriteItOut'):
close():

#
#  Get s9odr6c
#
print(`Compute s9odr6c`):
x0:=0.02: y0:=0.877:
GetCritPt(x0,y0,'x1','y1'):
print(`Residual error as a critical point:`):
print(max( abs(subs(x=x1,y=y1,fxyh)), 
	   abs(subs(x=x1,y=y1,yfxyh)) )):
#
#  Finding corresponding z and w
#
z1:=solve(subs(x=x1,y=y1,f13)):
w1:=solve(subs(x=x1,y=y1,z=z1,fw1)):
xyzw1:=vector([x1,y1,z1,w1]):
#
#  To verify that the computed solution is correct.
#
ResiErr(xyzw1):

#
#  Output the solution.
#
appendto(s9odr6abcd): writeln():
write(`Scheme`): write(`c`): write(`:`): writeln():
write(`=============`): writeln(): 
read('WriteItOut'):
close():

#
#  Get s9odr6d
#
read('gets9odr6d'):
print(`Compute s9odr6d`):
x0:=.28467183943928598030e-1: y0:=.87156040292818742103:
gets9odr6d(x0,y0,'x1','y1'):
print(`Residual error as a critical point:`):
print(max( abs(subs(x=x1,y=y1,fxyh)), 
	   abs(subs(x=x1,y=y1,uxyh)) )):
#
#  Finding corresponding z and w
#
z1:=solve(subs(x=x1,y=y1,f13)):
w1:=solve(subs(x=x1,y=y1,z=z1,fw1)):
xyzw1:=vector([x1,y1,z1,w1]):
#
#  To verify that the computed solution is correct.
#
ResiErr(xyzw1):

#
#  Output the solution.
#
appendto(s9odr6abcd): writeln():
write(`Scheme`): write(`d`): write(`:`): writeln():
write(`=============`): writeln(): 
read('WriteItOut'):
close():
