E1egi.cin

From TORI
Jump to: navigation, search

// e1egi.cin provides the complex double implementation in C++ of the slowly growing Abel function for the exponential to base \(\eta=\exp(1/\mathrm e)\)

//


z_type e1egi(z_type f){ int m,n,N; z_type g,p,q,s,t,c[20];
c[ 0]=0.;
c[ 1]= 1./ 36.;
c[ 2]= 1./ 540.;
c[ 3]= -1./ 7776.;
c[ 4]= -71./ 435456.;
c[ 5]= -8759./ 163296000.;
c[ 6]= 31./ 20995200.;
c[ 7]= 183311./ 16460236800.;
c[ 8]= 23721961./ 6207860736000.;
c[ 9]= -293758693./ 117328567910400.;
c[10]= -1513018279./ 577754311680000.;
c[11]= 1642753608337./ 3355597042237440000.;
c[12]= 3353487022709./ 1689531377909760000.;
c[13]= 11579399106239./ 40790114695249920000.;
c[14]= 254879276942944519./ 137219514685385932800000.;
c[15]=-13687940105188979843./14114007224782553088000000.;
p=(M_E-f)/M_E;
N=15; s=c[N]*p; for(n=N-1;n>0;n--){ s+=c[n]; s*=p;}

        g= s+20.0563555297533789;
// g= s + 20.28740458994004;
// g= s - 2.798248154231454;
return g + log(-p)/3. + 2./p;
}
z_type E1EGI(z_type z){ z_type p; int n;
        DO(n,18){ p=z-M_E; if(abs(p)<.3) break; z=log(z)*M_E; }
        return e1egi(z)+1.*n;
                        }
//