Difference between revisions of "Logiu.cin"

From TORI
Jump to navigation Jump to search
 
m (Text replacement - "\$([^\$]+)\$" to "\\(\1\\)")
 
Line 1: Line 1:
 
// [[Logiu.cin]] is the [[C++]] routine to calculate the [[superfunction]] of the [[logistic operator]]
 
// [[Logiu.cin]] is the [[C++]] routine to calculate the [[superfunction]] of the [[logistic operator]]
   
// $T(z)=4 z (1\!-\!z)$
+
// \(T(z)=4 z (1\!-\!z)\)
   
// built up at the fied point $1\!-\!1/4=3/4$
+
// built up at the fied point \(1\!-\!1/4=3/4\)
   
 
//<poem><nomathjax><nowiki>
 
//<poem><nomathjax><nowiki>

Latest revision as of 18:48, 30 July 2019

// Logiu.cin is the C++ routine to calculate the superfunction of the logistic operator

// \(T(z)=4 z (1\!-\!z)\)

// built up at the fied point \(1\!-\!1/4=3/4\)

//



DB Q=3; //
DB LQ;
DB QQ,Q2,Q3,Q4,Q5,Q6,Q7;
DB C1,C2,C3,C4,C5,C6,C7;
DB S1,S2,S3,S4,S5,S6,S7,S8;

void maq(DB q){
Q=q;
QQ=Q*Q;
Q2=QQ;
Q3=QQ*Q;
Q4=QQ*QQ;
Q5=Q4*Q;
Q6=Q3*Q3;
Q7=Q6*Q;
LQ=log(Q);
C2=1. / (1.-Q) ;
C3=2. /((1.-Q)*(1.-Q2) );
C4= (5.+Q) /((1.-Q)*(1.-Q2)*(1.-Q3) );
C5=2.*(7.+Q*(3.+Q*2.)) /((1.-Q)*(1.-Q2)*(1.-Q3)*(1.-Q4) );
C6=2.*(21.+Q*(14.+Q*(14.+Q*( 8.+Q*3.)))) /((1.-Q)*(1.-Q2)*(1.-Q3)*(1.-Q4)*(1.-Q5));
C7=4.*(33.+Q*(30.+Q*(37.+Q*(32.+Q*(27.+Q*(12.+Q*(8.+Q))))))) /((1.-Q)*(1.-Q2)*(1.-Q3)*(1.-Q4)*(1.-Q5)*(1.-Q6));
S1=1.;
S2=1. / (Q-1.);
S3=2.*Q /((Q-1.)*(Q2-1.));
S4= Q *(1.+5.*Q*Q) /((Q-1.)*(Q2-1.)*(Q3-1.) );
S5=2.*Q3*(3.+Q*(2.+QQ*7.)) /((Q-1.)*(Q2-1.)*(Q3-1.)*(Q4-1.) );
S6=2.*Q3*(1.+Q*(3.+QQ*(14.+Q*(14.+Q*(7.+QQ*21))))) /((Q-1.)*(Q2-1.)*(Q3-1.)*(Q4-1.)*(Q5-1.));
S7=4.*Q4*(1.+Q*(5.+Q*(15.+Q*(12.+Q*(8.+Q*(30.+Q*(37.+Q*(27.+Q*(12.+QQ*(33.))))))))))
                                                                /((Q-1.)*(Q2-1.)*(Q3-1.)*(Q4-1.)*(Q5-1.)*(Q6-1.));
S8=Q4*(1.+QQ*(5.+Q*(60.+Q*(69.+Q*(89.+Q*(162.+Q*(415.+Q*(495.+Q*(531.+Q*(267.+Q*(630.+Q*(705.+Q*(621.+Q*(396+Q*(165.+Q*429)
              ) ) ) ) ) ) ) ) ) ) ) ) )
        ) /((Q-1.)*(Q2-1.)*(Q3-1.)*(Q4-1.)*(Q5-1.)*(Q6-1.)*(Q7-1.));
;
printf("maq: Q=%9.6f\n",Q);}

z_type J(z_type z){ return .5-sqrt(.25-z/Q); }
z_type H(z_type z){ return Q*z*(1.-z); }

z_type f(z_type z){z_type e;e=exp(LQ*z);return e*(1.+e*(C2+e*(C3+e*(C4+e*(C5+e*(C6+e*C7)))))); }
z_type F(z_type z){ if(Re(z)>-6.) return H(F(z-1.)); return f(z);}
z_type e(z_type z){ return z*(1.+z*(S2+z*(S3+z*(S4+z*(S5+z*(S6+z*(S7+z* S8)))))));}
z_type E(z_type z){ if(abs(z)>.1) return E(J(z))+1.;
                        return log(e(z))/LQ;}
//#include "efjh.cin"
/*
z_type arccos(z_type z){ return -I*log(z+I*sqrt(1.-z*z)); }
z_type coe(z_type z){ return .5*(1.-cos(exp((z+1.)/LQ))); }
z_type boe(z_type z){ return LQ*log(arccos(1.-2.*z))-1.; }
z_type doe(z_type z){ return coe(1.+boe(z));; }
*/
z_type u(z_type z){
DB q1 =Q-1.;
DB q2 =Q-2.;
DB q3 =Q-3.;
DB q2L=log(q2);
DB U0=q1/Q;
DB U1=1.;
DB U2=-Q/(q1*q2);
DB U3=-2.*QQ/(q1*q1*q2*q2*q3);
DB U4=-2.*Q3*(Q-7.)/(q1*q1*q1*q2*q2*q2*(-21.+Q*(22.+Q*(-8.+Q))) );
z_type e=-exp(z*q2L)*cos(M_PI*z);
//return U0+e;
//return U0+e*(1.+e*(U2));
//return U0+e*(U1+e*(U2+e*U3));
return U0+e*(U1+e*(U2+e*(U3+e*U4)));
}
z_type U(z_type z){ if(Re(z)+3*fabs(Im(z))>-6.) return H(U(z-1.)); return u(z);}

//

//