#include #include #include #include const int precision=8; const int zmaxsize=3; const int cmaxsize=40; #include "genprec.h" #include "cgenprec.h" #include "apps.h" int n; int nmax; complexmp p,cwz; complexmp xmad; complexmp a[cmaxsizepad]; complexmp b[cmaxsizepad]; complexmp c[cmaxsizepad]; cpademp d; complexmp dnum[cmaxsizepad],dden[cmaxsizepad]; complexmp myrootsofden[cmaxsizepad]; complexmp myrootsofnum[cmaxsizepad]; int main() {int i; zsuppi(); zsupe(); //run this if e is needed zsuplogsp(); //run this if log base e of 10 is needed n=20; cout<<"The example is the 10,10 Pade Approximant to"<<'\n'; cout<<"sqrt(1+(2+i)x)/sqrt(1+(1+i)x)"<<'\n'; cout<<"The zeros of the numerator and denominator are calculated, and the"<<'\n'; cout<<"polynomial solver prints out rrr... as it finds the roots"<<'\n'; cout<<"at the end the residues at the poles of the denominator are printed"<<'\n'; zmessage="The calculation takes a few minutes on a 486DX2 50mhz PC"; zbreak(); cout<<'\n'; a[0]=cinttomp(1,0); //compute series a[1]=cinttomp(2,1); for (i=2;i