Difference between revisions of "Efjh.cin"
Jump to navigation
Jump to search
Line 45: | Line 45: | ||
z_type E(z_type z){ if(abs(z)>.1) return E(J(z))+1.; return log(e(z))/LQ;} |
z_type E(z_type z){ if(abs(z)>.1) return E(J(z))+1.; return log(e(z))/LQ;} |
||
− | // [[Category:LogisticSequence]][[Category: |
+ | // [[Category:Book]][[Category:BookCode]][[Category:LogisticSequence]][[Category:Superfunction]][[Category:C++]] |
Latest revision as of 07:00, 1 December 2018
// the code below should be stored as efjh.cin in order to compile the generators of pictures (explicit plots and/or the complex maps) of the LogisticSequence. Sorry for use of global variables; in future I should try to avoid this. Kouznetsov 17:16, 16 October 2012 (JST).
DB Q=3; // defaul 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;}
//