Vladif5c.cin

From TORI
Jump to navigation Jump to search

// vladif5c.cin is the test routine in C++ for evaluation of the natural tetration through the Cauchi integral, using the displaced contour.

//


z_type Zo=z_type(.31813150520476413, 1.3372357014306895);
z_type Zc=z_type(.31813150520476413,-1.3372357014306895);
#include "GLxw2048.inc"

z_type f4(z_type z){ //NOT SHIFTED FOR x1 !!!!
        #include"f2048natu.inc"
        //K and A are defined there
         int j,k,m,n; DB x,y, u, t; z_type c,d, cu,cd;
// z_type E[K],G[K];
        z_type E[2048],G[2048];
        DO(k,K){c=F[k];E[k]=log(c);G[k]=exp(c);}
// the initioalization abouve should run at the compillation
        c=0.;
        DO(k,K){t=A*GLx[k]; c+= GLw[k]*( G[k]/(z_type( 1.,t)-z) - E[k]/(z_type(-1.,t)-z) );}
        cu=.5-I/(2.*M_PI)*log( (z_type(1.,-A)+z)/(z_type(1., A)-z) );
        cd=.5-I/(2.*M_PI)*log( (z_type(1.,-A)-z)/(z_type(1., A)+z) );
        return c*(A/(2.*M_PI)) +Zo*cu+Zc*cd;
}

//#include "x1.inc"
//DB x1= -0.02454385682582; 1024;20;
DB x1= 0.00743143611046; //2048;24;

z_type F4(z_type z){ DB x=Re(z);
                        if(x<-.5) return log(F4(z+1.));
                        if(x> .5) return exp(F4(z-1.));
                        return f4(z+x1);
                }

z_type f5(z_type z){ //NOT SHIFTED FOR x1 !!!!
        //printf("f5 is called at, %9.4f %9.6f\n",Re(z), Im(z));
        #include"f2048minus05.inc"
        //K and A are defined there
         int j,k,m,n; DB x,y, u, t; z_type c,d, cu,cd;
// z_type E[K],G[K];
        z_type E[2048],G[2048];
        z+=.5;
        DO(k,K){c=F[k];E[k]=log(c);G[k]=exp(c);}
// the initioalization abouve should run at the compillation
        c=0.;
        DO(k,K){t=A*GLx[k]; c+= GLw[k]*( G[k]/(z_type( 1.,t)-z) - E[k]/(z_type(-1.,t)-z) );}
        cu=.5-I/(2.*M_PI)*log( (z_type(1.,-A)+z)/(z_type(1., A)-z) );
        cd=.5-I/(2.*M_PI)*log( (z_type(1.,-A)-z)/(z_type(1., A)+z) );
        c= c*(A/(2.*M_PI)) +Zo*cu+Zc*cd;
        //printf("f5 is about to retunv value, %9.4f %9.6f\n",Re(c), Im(c));
        return c;
        }

//#include "x1.inc"
//DB x1= 0.00743143611046; //2048;24;
//#include "test20.inc"
DB x1minus05= 0.00776084382757;

z_type F5(z_type z){ DB x=Re(z);
        // printf("F5 is called at, %9.4f %9.6f\n",Re(z), Im(z));
                        if(x<-1.) return log(F5(z+1.));
                        if(x> 0.) return exp(F5(z-1.));
        // printf("F5 sends to f5\n");
                        return f5(z+x1minus05);
                }
//#include"f4d1.cin"
//

//