Difference between revisions of "File:Autran9tes20t1.jpg"

From TORI
Jump to: navigation, search
(Importing image file)
 
 
Line 1: Line 1:
  +
[[Agreement]] map for the numerical implementation of function [[AuTra]];
Importing image file
 
  +
  +
$\mathcal A= A(x+\mathrm i y)$
  +
  +
  +
  +
==[[C++]] generator of curves==
  +
// Files [[sutran.cin]], [[ado.cin]], [[conto.cin]] shold be loaded in order to compile the code below
  +
<poem><nomathjax><nowiki>
  +
#include <math.h>
  +
#include <stdio.h>
  +
#include <stdlib.h>
  +
#define DB double
  +
#define DO(x,y) for(x=0;x<y;x++)
  +
using namespace std;
  +
#include<complex>
  +
typedef complex<double> z_type;
  +
#define Re(x) x.real()
  +
#define Im(x) x.imag()
  +
#define I z_type(0.,1.)
  +
#include "conto.cin"
  +
z_type tra(z_type z) {return z+exp(z);}
  +
  +
#include "sutran.cin"
  +
#include "arctran.cin"
  +
  +
z_type autran0(z_type z) {z_type e=exp(z); z_type s; int n,M;
  +
DB c[20]={-0.166666666666666667, 0.062500000000000, -0.0351851851851851852, 0.0208333333333333333,
  +
-0.00976190476190476190, 0.000356867283950617284, 0.00577884857646762409, -0.0054935515873015873,
  +
-0.00258505283582444076, 0.0121986400462962963, -0.00649411105018518438, -0.0264514796679871911,
  +
0.0478515524404502325, 0.0537587298747943833, -0.270736261932081259, -0.00655211866410402040,
  +
1.62788126261366988, -1.60768769009409886, -10.8381871746651334, 24.7850929105834429};
  +
M=9;
  +
s=c[M];
  +
for(n=M-1;n>=0;n--) { s*=e; s+=c[n];}
  +
return z/2.-1./e +e*s + 1.1259817765745026;}
  +
  +
z_type autran(z_type z)
  +
{ int n; z_type s=z; DB y;
  +
DO(n,40000){ y=fabs(Im(s));
  +
if( y<3. && y < 3.*(-2.5-Re(s)) ) return autran0(s)+(0.+n);
  +
s=arctran(s);
  +
}
  +
printf("autran: z=%9.6f %9.7f s=%9.6f %9.6f \n",Re(z),Im(z),Re(s),Im(s) );
  +
getchar(); return 0.;
  +
}
  +
  +
int main(){ int j,k,m,n; DB x,y, p,q, t; z_type z,c,d;
  +
int M=251,M1=M+1;
  +
int N=1001,N1=N+1;
  +
DB X[M1],Y[N1]; DB g[M1*N1]; DB f[M1*N1]; DB w[M1*N1]; char v[M1*N1];
  +
FILE *o;o=fopen("autran9tes20.eps","w"); ado(o,2010,2008);
  +
fprintf(o,"1005 1004 translate\n 100 100 scale\n");
  +
fprintf(o,"1 setlinejoin 2 setlinecap\n");
  +
DO(m,M1) X[m]=-10.+.08*(m-.5);
  +
DO(n,N1) Y[n]=-10.+.02*(n-.5);
  +
M(-10.1,3) L(-3.5,3) L(-2.5,0) L(-3.5,-3) L(-10.1,-3)
  +
fprintf(o,"C .8 1 .8 RGB F\n");
  +
for(m=-10;m<11;m++){M(m,-10) L(m,10) }
  +
for(n=-10;n<11;n++){M( -10,n) L(10,n)}
  +
fprintf(o,".006 W 0 0 0 RGB S\n");
  +
DO(m,M1)DO(n,N1){ g[m*N1+n]=9999;
  +
f[m*N1+n]=9999;}
  +
DO(m,M1){x=X[m]; if(m/10*10==m) printf("x=%6.3f\n",x);
  +
DO(n,N1){y=Y[n]; z=z_type(x,y); //if(abs(z+2.)>.019)
  +
c=autran(z);
  +
c=sutran(c);
  +
p=abs(c-z)/(abs(c)+abs(z)); p=-log(p)/log(10.);
  +
if(p>.5 && p<20.){ g[m*N1+n]=p;}
  +
// p=Re(c); q=Im(c); if(p<1000 && p>-1000 && q<1000 && q>-1000
  +
// ( x<2. || fabs(q)>1.e-12 && fabs(p)>1.e-12)){ g[m*N1+n]=p;f[m*N1+n]=q;}
  +
}}
  +
fprintf(o,"1 setlinejoin 1 setlinecap\n");
  +
p=16.;q=.1;
  +
conto(o,g,w,v,X,Y,M,N,(16. ),-p,p); fprintf(o,".003 W 1 0 1 RGB S\n");
  +
conto(o,g,w,v,X,Y,M,N,(15. ),-p,p); fprintf(o,".012 W .6 0 1 RGB S\n");
  +
conto(o,g,w,v,X,Y,M,N,(14. ),-p,p); fprintf(o,".004 W .5 .5 0 RGB S\n");
  +
// conto(o,g,w,v,X,Y,M,N,(13.7 ),-p,p); fprintf(o,".004 W 1 1 0 RGB S\n");
  +
conto(o,g,w,v,X,Y,M,N,(13. ),-p,p); fprintf(o,".004 W 0 0 0 RGB S\n");
  +
conto(o,g,w,v,X,Y,M,N,(12. ),-p,p); fprintf(o,".012 W 0 0 1 RGB S\n");
  +
conto(o,g,w,v,X,Y,M,N,(11. ),-p,p); fprintf(o,".004 W 0 0 0 RGB S\n");
  +
conto(o,g,w,v,X,Y,M,N,(10. ),-p,p); fprintf(o,".004 W 0 0 0 RGB S\n");
  +
conto(o,g,w,v,X,Y,M,N, (9. ),-p,p); fprintf(o,".014 W 0 .5 1 RGB S\n");
  +
conto(o,g,w,v,X,Y,M,N, (8. ),-p,p); fprintf(o,".004 W 0 0 0 RGB S\n");
  +
conto(o,g,w,v,X,Y,M,N, (7. ),-p,p); fprintf(o,".004 W 0 0 0 RGB S\n");
  +
conto(o,g,w,v,X,Y,M,N, (6. ),-p,p); fprintf(o,".012 W 0 .6 0 RGB S\n");
  +
conto(o,g,w,v,X,Y,M,N, (5. ),-p,p); fprintf(o,".004 W 0 0 0 RGB S\n");
  +
conto(o,g,w,v,X,Y,M,N, (4. ),-p,p); fprintf(o,".004 W 0 0 0 RGB S\n");
  +
conto(o,g,w,v,X,Y,M,N, (3. ),-p,p); fprintf(o,".012 W 1 0 0 RGB S\n");
  +
conto(o,g,w,v,X,Y,M,N, (2. ),-p,p); fprintf(o,".004 W 0 0 0 RGB S\n");
  +
conto(o,g,w,v,X,Y,M,N, (1. ),-p,p); fprintf(o,".015 W .5 0 0 RGB S\n");
  +
  +
/*
  +
for(m=-8;m<8;m++)for(n=2;n<10;n+=2)conto(o,f,w,v,X,Y,M,N,(m+.1*n),-q,q);fprintf(o,".008 W 0 .6 0 RGB S\n");
  +
for(m=0;m<8;m++) for(n=2;n<10;n+=2)conto(o,g,w,v,X,Y,M,N,-(m+.1*n),-q,q);fprintf(o,".008 W .9 0 0 RGB S\n");
  +
for(m=0;m<8;m++) for(n=2;n<10;n+=2)conto(o,g,w,v,X,Y,M,N, (m+.1*n),-q,q);fprintf(o,".008 W 0 0 .9 RGB S\n");
  +
for(m= 1;m<17;m++) conto(o,f,w,v,X,Y,M,N, (0.-m),-p,p);fprintf(o,".032 W .8 0 0 RGB S\n");
  +
for(m= 1;m<17;m++) conto(o,f,w,v,X,Y,M,N, (0.+m),-p,p);fprintf(o,".032 W 0 0 .8 RGB S\n");
  +
conto(o,f,w,v,X,Y,M,N, (0. ),-2*p,2*p); fprintf(o,".032 W .5 0 .5 RGB S\n");
  +
for(m=-16;m<17;m++)conto(o,g,w,v,X,Y,M,N,(0.+m),-p,p);fprintf(o,".03 W 0 0 0 RGB S\n");
  +
  +
fprintf(o,"0 setlinejoin 0 setlinecap\n");
  +
M(-10, M_PI)L(-1, M_PI)
  +
M(-10,-M_PI)L(-1,-M_PI) fprintf(o,"1 1 1 RGB .044 W S\n");
  +
DO(n,51){M(-1.-.2*n, M_PI)L(-1.-.2*(n+.4), M_PI) }
  +
DO(n,51){M(-1.-.2*n,-M_PI)L(-1.-.2*(n+.4),-M_PI) } fprintf(o,"0 0 0 RGB .05 W S\n");
  +
*/
  +
  +
fprintf(o,"showpage\n");
  +
fprintf(o,"%c%cTrailer\n",'%','%');
  +
fclose(o);
  +
system("epstopdf autran9tes20.eps");
  +
system( "open autran9tes20.pdf"); //for macintosh
  +
getchar(); system("killall Preview"); // For macintosh
  +
  +
c=autran( z_type(-1.,M_PI) );
  +
z=sutran(c);
  +
printf("c=%19.16lf %19.16lf z=%19.16lf %19.16lf\n",Re(c),Im(c),Re(z),Im(z));
  +
}
  +
</nowiki></nomathjax></poem>
  +
  +
==[[Latex]] generator of labels==
  +
<poem><nomathjax><nowiki>
  +
\documentclass[12pt]{article}
  +
\paperwidth 2096px
  +
\paperheight 2072px
  +
\textwidth 2394px
  +
\textheight 2300px
  +
\topmargin -101px
  +
\oddsidemargin -78px
  +
\usepackage{graphics}
  +
\usepackage{rotating}
  +
\newcommand \sx {\scalebox}
  +
\newcommand \rot {\begin{rotate}}
  +
\newcommand \ero {\end{rotate}}
  +
\newcommand \ing {\includegraphics}
  +
\newcommand \rmi {\mathrm{i}}
  +
\parindent 0pt
  +
\pagestyle{empty}
  +
\begin{document}
  +
\newcommand \zoomax {
  +
\put(40,2048){\sx{8}{$y$}}
  +
\put(40,1870){\sx{7}{$8$}}
  +
\put(40,1670){\sx{7}{$6$}}
  +
\put(40,1470){\sx{7}{$4$}}
  +
\put(40,1270){\sx{7}{$2$}}
  +
\put(40,1070){\sx{7}{$0$}}
  +
\put(-12,870){\sx{7}{$-2$}}
  +
\put(-12,670){\sx{7}{$-4$}}
  +
\put(-12,470){\sx{7}{$-6$}}
  +
\put(-12,270){\sx{7}{$-8$}}
  +
\put(002, 28){\sx{7}{$-\!10$}}
  +
\put(220, 28){\sx{7}{$-8$}}
  +
\put(420, 28){\sx{7}{$-6$}}
  +
\put(620, 28){\sx{7}{$-4$}}
  +
\put(820, 28){\sx{7}{$-2$}}
  +
\put(1088, 28){\sx{7}{$0$}}
  +
\put(1288, 28){\sx{7}{$2$}}
  +
\put(1488, 28){\sx{7}{$4$}}
  +
\put(1688, 28){\sx{7}{$6$}}
  +
\put(1888, 28){\sx{7}{$8$}}
  +
\put(2058, 28){\sx{7}{$x$}}
  +
%\put(2166, 28){\sx{7}{$x$}}
  +
}
  +
\parindent 0pt
  +
\sx{1}{\begin{picture}(2102,2094)
  +
\zoomax
  +
\put(98,88){\ing{autran9tes20}}
  +
  +
\put( 140,1318){\sx{6}{range of}}
  +
\put( 140,1224){\sx{6}{the primary}}
  +
\put( 140,1130){\sx{6}{approximation}}
  +
\put( 910, 940){\sx{9}{\rot{90}$\mathcal A \!\approx \! 16$\ero}}
  +
\put(1020, 940){\sx{9}{\rot{90}$\mathcal A \!\approx \! 15$\ero}}
  +
%\put( 1440, 940){\sx{9}{\rot{90}$\mathcal A \!\approx \! 14$\ero}}
  +
\put( 1700, 940){\sx{9}{\rot{90}$\mathcal A \!\approx \! 14$\ero}}
  +
\put(160,610){\sx{8}{$13\!<\! \mathcal A \!<\! 14$}}
  +
\put(610,110){\sx{8}{$13\!<\! \mathcal A \!<\! 14$}}
  +
\put(1100,410){\sx{9}{$\mathcal A \!\approx \! 14$}}
  +
  +
\end{picture}}
  +
\end{document}
  +
</nowiki></nomathjax></poem>
  +
  +
==References==
  +
<references/>
  +
  +
[[Category:Autra]]
  +
[[Category:Agreement map]]
  +
[[Category:Primary approximation]]
  +
[[Category:C++]]
  +
[[Category:Latex]]

Latest revision as of 08:30, 1 December 2018

Agreement map for the numerical implementation of function AuTra;

$\mathcal A= A(x+\mathrm i y)$


C++ generator of curves

// Files sutran.cin, ado.cin, conto.cin shold be loaded in order to compile the code below


#include <math.h>
#include <stdio.h>
#include <stdlib.h>
#define DB double
#define DO(x,y) for(x=0;x<y;x++)
using namespace std;
#include<complex>
typedef complex<double> z_type;
#define Re(x) x.real()
#define Im(x) x.imag()
#define I z_type(0.,1.)
#include "conto.cin"
z_type tra(z_type z) {return z+exp(z);}

#include "sutran.cin"
#include "arctran.cin"

z_type autran0(z_type z) {z_type e=exp(z); z_type s; int n,M;
DB c[20]={-0.166666666666666667, 0.062500000000000, -0.0351851851851851852, 0.0208333333333333333,
-0.00976190476190476190, 0.000356867283950617284, 0.00577884857646762409, -0.0054935515873015873,
-0.00258505283582444076, 0.0121986400462962963, -0.00649411105018518438, -0.0264514796679871911,
 0.0478515524404502325, 0.0537587298747943833, -0.270736261932081259, -0.00655211866410402040,
 1.62788126261366988, -1.60768769009409886, -10.8381871746651334, 24.7850929105834429};
M=9;
s=c[M];
for(n=M-1;n>=0;n--) { s*=e; s+=c[n];}
                         return z/2.-1./e +e*s + 1.1259817765745026;}

z_type autran(z_type z)
{ int n; z_type s=z; DB y;
   DO(n,40000){ y=fabs(Im(s));
            if( y<3. && y < 3.*(-2.5-Re(s)) ) return autran0(s)+(0.+n);
              s=arctran(s);
            }
   printf("autran: z=%9.6f %9.7f s=%9.6f %9.6f \n",Re(z),Im(z),Re(s),Im(s) );
 getchar(); return 0.;
}
 
int main(){ int j,k,m,n; DB x,y, p,q, t; z_type z,c,d;
int M=251,M1=M+1;
int N=1001,N1=N+1;
DB X[M1],Y[N1]; DB g[M1*N1]; DB f[M1*N1]; DB w[M1*N1]; char v[M1*N1];
FILE *o;o=fopen("autran9tes20.eps","w"); ado(o,2010,2008);
fprintf(o,"1005 1004 translate\n 100 100 scale\n");
fprintf(o,"1 setlinejoin 2 setlinecap\n");
DO(m,M1) X[m]=-10.+.08*(m-.5);
DO(n,N1) Y[n]=-10.+.02*(n-.5);
M(-10.1,3) L(-3.5,3) L(-2.5,0) L(-3.5,-3) L(-10.1,-3)
fprintf(o,"C .8 1 .8 RGB F\n");
for(m=-10;m<11;m++){M(m,-10) L(m,10) }
for(n=-10;n<11;n++){M( -10,n) L(10,n)}
 fprintf(o,".006 W 0 0 0 RGB S\n");
DO(m,M1)DO(n,N1){ g[m*N1+n]=9999;
                       f[m*N1+n]=9999;}
DO(m,M1){x=X[m]; if(m/10*10==m) printf("x=%6.3f\n",x);
DO(n,N1){y=Y[n]; z=z_type(x,y); //if(abs(z+2.)>.019)
  c=autran(z);
  c=sutran(c);
 p=abs(c-z)/(abs(c)+abs(z)); p=-log(p)/log(10.);
 if(p>.5 && p<20.){ g[m*N1+n]=p;}
// p=Re(c); q=Im(c); if(p<1000 && p>-1000 && q<1000 && q>-1000
// ( x<2. || fabs(q)>1.e-12 && fabs(p)>1.e-12)){ g[m*N1+n]=p;f[m*N1+n]=q;}
       }}
fprintf(o,"1 setlinejoin 1 setlinecap\n");
  p=16.;q=.1;
 conto(o,g,w,v,X,Y,M,N,(16. ),-p,p); fprintf(o,".003 W 1 0 1 RGB S\n");
 conto(o,g,w,v,X,Y,M,N,(15. ),-p,p); fprintf(o,".012 W .6 0 1 RGB S\n");
 conto(o,g,w,v,X,Y,M,N,(14. ),-p,p); fprintf(o,".004 W .5 .5 0 RGB S\n");
// conto(o,g,w,v,X,Y,M,N,(13.7 ),-p,p); fprintf(o,".004 W 1 1 0 RGB S\n");
 conto(o,g,w,v,X,Y,M,N,(13. ),-p,p); fprintf(o,".004 W 0 0 0 RGB S\n");
 conto(o,g,w,v,X,Y,M,N,(12. ),-p,p); fprintf(o,".012 W 0 0 1 RGB S\n");
 conto(o,g,w,v,X,Y,M,N,(11. ),-p,p); fprintf(o,".004 W 0 0 0 RGB S\n");
 conto(o,g,w,v,X,Y,M,N,(10. ),-p,p); fprintf(o,".004 W 0 0 0 RGB S\n");
 conto(o,g,w,v,X,Y,M,N, (9. ),-p,p); fprintf(o,".014 W 0 .5 1 RGB S\n");
 conto(o,g,w,v,X,Y,M,N, (8. ),-p,p); fprintf(o,".004 W 0 0 0 RGB S\n");
 conto(o,g,w,v,X,Y,M,N, (7. ),-p,p); fprintf(o,".004 W 0 0 0 RGB S\n");
 conto(o,g,w,v,X,Y,M,N, (6. ),-p,p); fprintf(o,".012 W 0 .6 0 RGB S\n");
 conto(o,g,w,v,X,Y,M,N, (5. ),-p,p); fprintf(o,".004 W 0 0 0 RGB S\n");
 conto(o,g,w,v,X,Y,M,N, (4. ),-p,p); fprintf(o,".004 W 0 0 0 RGB S\n");
 conto(o,g,w,v,X,Y,M,N, (3. ),-p,p); fprintf(o,".012 W 1 0 0 RGB S\n");
 conto(o,g,w,v,X,Y,M,N, (2. ),-p,p); fprintf(o,".004 W 0 0 0 RGB S\n");
 conto(o,g,w,v,X,Y,M,N, (1. ),-p,p); fprintf(o,".015 W .5 0 0 RGB S\n");

/*
for(m=-8;m<8;m++)for(n=2;n<10;n+=2)conto(o,f,w,v,X,Y,M,N,(m+.1*n),-q,q);fprintf(o,".008 W 0 .6 0 RGB S\n");
for(m=0;m<8;m++) for(n=2;n<10;n+=2)conto(o,g,w,v,X,Y,M,N,-(m+.1*n),-q,q);fprintf(o,".008 W .9 0 0 RGB S\n");
for(m=0;m<8;m++) for(n=2;n<10;n+=2)conto(o,g,w,v,X,Y,M,N, (m+.1*n),-q,q);fprintf(o,".008 W 0 0 .9 RGB S\n");
for(m= 1;m<17;m++) conto(o,f,w,v,X,Y,M,N, (0.-m),-p,p);fprintf(o,".032 W .8 0 0 RGB S\n");
for(m= 1;m<17;m++) conto(o,f,w,v,X,Y,M,N, (0.+m),-p,p);fprintf(o,".032 W 0 0 .8 RGB S\n");
               conto(o,f,w,v,X,Y,M,N, (0. ),-2*p,2*p); fprintf(o,".032 W .5 0 .5 RGB S\n");
for(m=-16;m<17;m++)conto(o,g,w,v,X,Y,M,N,(0.+m),-p,p);fprintf(o,".03 W 0 0 0 RGB S\n");

fprintf(o,"0 setlinejoin 0 setlinecap\n");
M(-10, M_PI)L(-1, M_PI)
M(-10,-M_PI)L(-1,-M_PI) fprintf(o,"1 1 1 RGB .044 W S\n");
DO(n,51){M(-1.-.2*n, M_PI)L(-1.-.2*(n+.4), M_PI) }
DO(n,51){M(-1.-.2*n,-M_PI)L(-1.-.2*(n+.4),-M_PI) } fprintf(o,"0 0 0 RGB .05 W S\n");
*/

fprintf(o,"showpage\n");
fprintf(o,"%c%cTrailer\n",'%','%');
fclose(o);
      system("epstopdf autran9tes20.eps");
      system( "open autran9tes20.pdf"); //for macintosh
      getchar(); system("killall Preview"); // For macintosh

c=autran( z_type(-1.,M_PI) );
z=sutran(c);
printf("c=%19.16lf %19.16lf z=%19.16lf %19.16lf\n",Re(c),Im(c),Re(z),Im(z));
}

Latex generator of labels


\documentclass[12pt]{article}
\paperwidth 2096px
\paperheight 2072px
\textwidth 2394px
\textheight 2300px
\topmargin -101px
\oddsidemargin -78px
\usepackage{graphics}
\usepackage{rotating}
\newcommand \sx {\scalebox}
\newcommand \rot {\begin{rotate}}
\newcommand \ero {\end{rotate}}
\newcommand \ing {\includegraphics}
\newcommand \rmi {\mathrm{i}}
\parindent 0pt
\pagestyle{empty}
\begin{document}
\newcommand \zoomax {
\put(40,2048){\sx{8}{$y$}}
\put(40,1870){\sx{7}{$8$}}
\put(40,1670){\sx{7}{$6$}}
\put(40,1470){\sx{7}{$4$}}
\put(40,1270){\sx{7}{$2$}}
\put(40,1070){\sx{7}{$0$}}
\put(-12,870){\sx{7}{$-2$}}
\put(-12,670){\sx{7}{$-4$}}
\put(-12,470){\sx{7}{$-6$}}
\put(-12,270){\sx{7}{$-8$}}
\put(002, 28){\sx{7}{$-\!10$}}
\put(220, 28){\sx{7}{$-8$}}
\put(420, 28){\sx{7}{$-6$}}
\put(620, 28){\sx{7}{$-4$}}
\put(820, 28){\sx{7}{$-2$}}
\put(1088, 28){\sx{7}{$0$}}
\put(1288, 28){\sx{7}{$2$}}
\put(1488, 28){\sx{7}{$4$}}
\put(1688, 28){\sx{7}{$6$}}
\put(1888, 28){\sx{7}{$8$}}
\put(2058, 28){\sx{7}{$x$}}
%\put(2166, 28){\sx{7}{$x$}}
}
\parindent 0pt
\sx{1}{\begin{picture}(2102,2094)
\zoomax
\put(98,88){\ing{autran9tes20}}

\put( 140,1318){\sx{6}{range of}}
\put( 140,1224){\sx{6}{the primary}}
\put( 140,1130){\sx{6}{approximation}}
\put( 910, 940){\sx{9}{\rot{90}$\mathcal A \!\approx \! 16$\ero}}
\put(1020, 940){\sx{9}{\rot{90}$\mathcal A \!\approx \! 15$\ero}}
%\put( 1440, 940){\sx{9}{\rot{90}$\mathcal A \!\approx \! 14$\ero}}
\put( 1700, 940){\sx{9}{\rot{90}$\mathcal A \!\approx \! 14$\ero}}
\put(160,610){\sx{8}{$13\!<\! \mathcal A \!<\! 14$}}
\put(610,110){\sx{8}{$13\!<\! \mathcal A \!<\! 14$}}
\put(1100,410){\sx{9}{$\mathcal A \!\approx \! 14$}}

\end{picture}}
\end{document}

References

File history

Click on a date/time to view the file as it appeared at that time.

Date/TimeThumbnailDimensionsUserComment
current06:10, 1 December 2018Thumbnail for version as of 06:10, 1 December 20184,366 × 4,316 (1.68 MB)Maintenance script (talk | contribs)Importing image file
  • You cannot overwrite this file.

The following page links to this file:

Metadata