{'fraction_non_alphanumeric': 0.037577815506508204, 'fraction_numerical': 0.01697792869269949, 'mean_word_length': 4.300884955752212, 'pattern_counts': {'":': 0, '<': 2, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 1, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Representation of conformal maps by rational functions

The traditional view in numerical conformal mapping is that once the boundary correspondence function has been found, the map and its inverse can be evaluated by contour integrals. We propose that it is much simpler, and 10-1000 times faster, to represent the maps by rational functions computed by the AAA algorithm. To justify this claim, first we prove a theorem establishing root-exponential convergence of rational approximations near corners in a conformal map, generalizing a result of D. J. Newman in 1964. This leads to the new algorithm for approximating conformal maps of polygons. Then we turn to smooth domains and prove a sequence of four theorems establishing that in any conformal map of the unit circle onto a region with a long and slender part, there must be a singularity or loss of univalence exponentially close to the boundary, and polynomial approximations cannot be accurate unless of exponentially high degree. This motivates the application of the new algorithm to smooth domains, where it is again found to be highly effective.

If the domains are smooth, the first step is often carried out by solving an integral equation. Most domains of interest in practice are not smooth, and the corners that appear so often bring in new challenges that traditionally would be addressed by the exploitation of the local structure of each singularity [1,21,26]. In the extreme case of the map of a disk or a half-plane onto a polygon, the problem is "all singularities," and here one may make use of a numerical implementation of the Schwarz-Christoffel formula, for which the standard software is Driscoll's SC Toolbox in MATLAB [7,9,25].
In this paper we propose a different approach to the second phase of computing a conformal map. Instead of evaluating Cauchy or Schwarz-Chrstoffel integrals, we propose the use of rational functions to represent the maps, one rational function in the forward direction and another in the inverse direction. Instead of exploiting the structure of singularities, we ignore their presence and let the rational approximations do the work. This is not asymptotically optimal for very high accuracies, but in the practical regime, it is remarkable how efficient it can be. For a polygonal region with around six corners, we find that rational functions of degree 30 to 100 typically suffice for mapping to 7-8 digit accuracy, and the evaluation time is on the order of a microsecond per point mapped on a laptop. Mapping tens of thousands of points back and forth accordingly takes a fraction of a second.
Until recently, it would not have been feasible to construct or evaluate such rational functions, but this situation has changed with the appearance of the AAA algorithm [22]. This algorithm represents rational functions by quotients of partial fractions rather than polynomials, with the necessary support points determined adaptively. 1 If Z and F are sets of, say, 5000 corresponding points on the boundaries of the domain and target regions, the command r = aaa(F,Z) in Chebfun [8] will typically construct a rational function mapping Z to F in less than a second on a laptop. A aaa code in MATLAB is listed in [22], and a Python implementation is available from the first author.
The mathematics of what makes these approximations so effective is a new result, which we prove in the appendix, that is related to a celebrated theorem published by Donald Newman in 1964 [23]. Newman showed that the minimax error E n for approximation of f (x) = |x| on [−1, 1] by type (n, n) rational functions decreases at the rate exp(−A √ n) for some A > 0 as n → ∞. The sharp constant is A = π, and more generally, for approximation on [−1, 1] of f (x) = |x| α with α > 0, Stahl [30] showed that root-exponential convergence occurs at the rate This estimate is sharp unless α is an even integer, in which case f reduces to a polynomial. In the context of our conformal maps, the essential problem is that of approximating the complex function x α on a one-sided complex neighborhood of [−1, 1] rather than the real function |x| α on [−1, 1] alone. This is a genuinely different problem, which we believe has not been considered before, but as we prove in the appendix, the convergence rate is again rootexponential. 2 Though a single corner is the case we analyze, in practice the method is more general. If there are k singular corners, the type (n, n) of the rational function required for a given accuracy increases only approximately in proportion to k, and whether the sides are straight or not is immaterial. For example, the standard branch of z 1/2 log(z) is as easily approximated as that of z 1/2 for z ≈ 0 in the upper half-plane. Application of aaa for these functions gives approximations accurate to 6 digits on [−1, 1] with n = 36 and 29, respectively. Section 2 illustrates rational approximations for conformal maps of polygons. The examples are interesting from the point of view of complex approximation theory, revealing how poles accumulate near singular corners but not near nonsingular ones, and that some singularities are much stronger than others. Section 3 shows approximations for regions with analytic boundaries, emphasizing that even in this case singularities near the boundaries may be of controlling importance. Section 4 examines the accuracy of our approximations, and Section 5 comments on the problem of spurious poles or Froissart doublets. The theorem mentioned above is proved in the appendix.

Conformal maps of polygons
Let ∆ be the closed unit disk in the z-plane and P the closed region bounded by a polygon with k vertices w 1 , . . . , w k in the w-plane. The Schwarz-Christoffel (henceforth SC) formula represents a conformal map f : ∆ → P in terms of an integral with fractional power singularities at the prevertices z j = f −1 (w j ) [9]. Determining the prevertices for a given P is a numerical problem known as the SC parameter problem. The following SC Toolbox commands solve the parameter problem to construct a map f onto an L-shaped region and then evaluate f and f −1 each at a point. Any simply connected conformal mapping problem has a unique solution up to three free real parameters, and here these are set by the complex condition f (0) = 0.7 + 0.7i, imposed by the center command, together with the boundary condition z k = 1, imposed by default by the Toolbox. w = [2+i 1+i 1+2i 2i 0 2] c = .7+.7i p = polygon(w) opts = sctool.scmapopt('Tolerance',1e-12) f = diskmap(p,opts) f = center(f,c) 2 The title of [30] mentions [0, 1] rather than [−1, 1], which may be confusing since x α and |x| α are the same on this interval. In fact, type (n, n) approximation of |x| α on [−1, 1] is equivalent to type (n/2, n/2) approximation of x α/2 on [0, 1], as Stahl discusses in his introduction; the equivalence is also spelled on p. 213 of [33]. The approximation of the complex function x α on [−1, 1], however, is not equivalent to any approximation problem on [0, 1] so far as we are aware. Note that these commands override the default SC Toolbox tolerance of 10 −6 to 10 −12 . The result is a forward and inverse map with approximately twelve digits of accuracy almost everywhere in the domain, except that very close to some of the corners or their preimages, the accuracy falls to five or six digits (see Section 4). 3 We now discuss Figure 1, which displays this conformal map and its inverse and illustrates the rational approximations that are the subject of this paper.  to determine forward and inverse rational functions r and s such that F ≈ r(Z) and Z ≈ s(F ); these computations take less than a second. The poles of r and s are returned in the vectors rpol and spol, computed from the AAA barycentric representation by solving a generalized eigenvalue problem [22], and the corresponding residues are returned in rres and sres.
To make the plots, we next apply r to map a grid of points in ∆ to their images in P , which takes about a millisecond. As usual with conformal maps, there are exponential distortions involved, leading to a very uneven distribution of image dots. The second row of the figure shows the inverse map f −1 , including a grid of points in P and their equally unevenly distributed (pre)images in ∆ computed with s, again requiring about a millisecond. The plots also show a white dot in the interior and another on the boundary of each region, together with their images, to complete the specification of the conformal mapping problem.
Most striking in Figure 1 are the red dots representing poles of r (top left) and s (bottom left). These are sized to indicate the magnitude of each residue, with a logarithmic spacing from the smallest diameter for magnitude 10 −3 or less to the largest for magnitude 1 or more. In the upper-left plot, we see chains of poles of r with diminishing residues approaching all six prevertices (two pairs of which are quite close together). This is a familiar effect in rational approximation [28,31], and it occurs because all six points correspond to branch point singularities of f , with local behavior of type (z − z j ) 1/2 for the five salient corners and (z − z j ) 3/2 at the reentrant corner. The degree 58 marked in the title indicates that r is a rational function of type (58, 58), that is, with 58 poles (some of which are not in the picture). The lower-left plot, on the other hand, shows poles only approaching the reentrant corner for the inverse map. This is because the other corners have local behavior of type (w − w j ) 2 , which is not singular. 4 Figure 2 shows closeups from each of these figures.
The "speedup" numbers in the titles give estimates of how much faster AAA is for evaluating each map than the SC Toolbox. To compute these numbers, timings for mapping the grid of points are compared with timings for the corresponding SC Toolbox command. Throughout our explorations, we have found that the rational functions are typically 10-1000 times faster than the Toolbox. The speedup numbers in our plots are only approximate; they vary from one run to the next.
Finally there are the errors listed in the titles. In the upper-right plot the first of these numbers, labeled 'max', is determined by sampling the boundary on a grid four times finer than the sample set and computing the maximum of |f (z) − r(z)| at these points, with f calculated by the SC Toolbox. Since f and r are both analytic in ∆, the maximum modulus principle implies that this can be counted on as close to a true maximum error in the rational representation. These numbers are generally disappointing, but this reflects diminished accuracy only in extremely small regions close to the vertices, as we shall discuss in Section 4 (see in particular Figure 10). Elsewhere, the accuracy is excellent, and this is reflected in the "rms" errors, which show root-mean-square errors in the grid of points. Note that the rms errors are much smaller than 1/ √ 1000 times the max errors, implying that none of the ≈1000 grid points have errors even close to maximal.
The lower-right plot, for the inverse map, is labeled in the same manner, now with the maximum error based on the maximum of |f −1 (w) − s(w)|, again on a boundary grid four times finer and with f −1 computed by the SC Toolbox.
We mentioned that the five salient right angles of the L-shaped region are nonsingular. Figure 3 highlights this effect by repeating Figure 1 with the vertices perturbed. Now all the corners are singular, and poles of s appear near all of them. At the same time, the widely varying sizes of the dots illustrates how much more important some singularities are than others. The rational function s has just a single pole within a distance 1/2 of the singular vertex near 1 + 2i, for example, with residue of absolute value just 8 × 10 −5 . By contrast there are 28 poles within the same distance of the reentrant corner near 1 + i, their distance decaying from O(1) to O(10 −4 ) as the absolute value of the residue decays from O(10 −1 ) to O(10 −7 ).
At the other extreme, Figure 4 shows the conformal map onto a rectangle. Here the inverse map has no singular corners, and indeed it is a doubly periodic elliptic function (as follows from the Schwarz reflection principle). In this case, no poles approach the boundary of P , and the associated rational function has degree just 9. The two poles visible on these axes lie at about 1.5i+10 −7 (4+4i) and −0.5i + 10 −7 (3 + 2i), very close to the positions 1.5i and −0.5i of the innermost poles of the elliptic function. Their residues match the theoretical value −2/π to about three digits. In this as in most rational approximations, one should bear in mind that r or s will match poles or residues of f or f −1 only "as a means to the end" of approximating f or f −1 itself at the prescribed sample points, so not too much should be read into the number of digits of agreement. For example, this elliptic function has infinitely many poles in the plane, and obviously s is not going to approximate all of them. One may also note in the upper-left image of Figure 4, as in several of our other figures, that the AAA algorithm does not respect symmetry of approximation problems. One might have expected the poles of r to be real, or at least to fall in complex conjugate pairs, but the algorithm does not impose this condition. (As mentioned in [22], one could develop variant algorithms with this property.) Figure 5 shows a 12-sided snowflake. Note again the inexact symmetries and the differences in the strengths of the singularities between salient and reentrant corners. Figure 6 shows one of the isospectral drums made famous by Gordon, Webb, and Wolpert [15]. Here two of the vertices, with internal angles just π/4, represent the strongest singularities we have seen yet (in the forward direction, the upper-left plot).   These examples involve maps of the unit disk to a polygon, but there are other possibilities. For example, variants of the SC formula are implemented in the SC Toolbox for mapping to a polygon from a half-plane, a rectangle, or an infinite strip [7,9]. Moreover, the domains need not be bounded, and if they are unbounded, rational functions can still be used to represent the conformal maps. Figure 7 illustrates this with images for the map of a rectangle to an infinite polygon P consisting of another rectangle along one side of which a channel extending to ∞ has been attached at a 45 • angle. The polygon P is first prescribed; then a rectangle in the z-plane is determined with the uniquely determined aspect ratio such that its four corners can map to the four rightangle corners of P . Such calculations are easy with the SC Toolbox, and the rational functions speed up the results dramatically.

Conformal maps of regions with analytic boundaries
So far we have looked at polygons, where the sides are straight and all the challenge is with the corners. One reason for this emphasis is that the SC Toolbox is the most widely used conformal mapping software package available, and another is that it is in the case of maps with corners where the power of rational functions is most striking. For a (bounded) region with an analytic boundary, by contrast, all sorts of approximations are in principle capable of exponential convergence, including polynomials, though in practice the numerical challenges will often be severe. Along with approximation power, however, the great strength of AAA rational approximation is its simplicity, requiring no analysis of the domains in play, and to illustrate this, we show conformal maps of regions with analytic boundaries in Figures 8 and 9. These were computed by a numerical implementation of the Kerzman-Stein integral equation in Chebfun using codes developed by Caldwell, Li, and Greenbaum [5,19,20], with a discretization by 800 points along the boundary. Unlike the Schwarz-Christoffel formula, the Kerzman-Stein equation constructs the mapping f in the direction from the problem domain to the unit disk. As before, one of the attractions of rational approximations is that they give representations of f −1 as well as f .
The images in Figure 8 show an ellipse with semiaxes 1 and 0.25; a rounded version of the snowflake of Figure 5 defined in polar coordinates by r = 0.8 + 0.14 cos(6θ); and a shape with a smooth random boundary defined in Chebfun by setting r(θ) equal to 0.8+0.16*randnfun(0.6,[0 2*pi],'trig') [11]. In each case the poles of the AAA rational approximation r ≈ f are shown in the left panel and those of s ≈ f −1 are shown in the right panel. The degrees of r and s are listed in the titles along with what we call the back-and-forth error, defined as the maximum of |w j − r(s(w j ))| over the grid of points w j  [5,19,20]. Although the boundaries are analytic, these maps have singularities very nearby, and these are reflected in the poles of the rational approximations.
plotted in the disk. For these computations we loosened the AAA tolerance from 10 −7 to 10 −6 .
As a further indication of the speed of rational representations of conformal maps, suppose that for the region in the bottom row of Figure 8, instead of a grid of about 10 3 points in the disk (the exact number is 1264), we increase the number to about 10 6 and again compute |w j − r(s(w j ))|, thus applying a degree 55 rational function and also a degree 44 rational function one million times each. On our laptop running MATLAB, the total time is 1.7 seconds.  Fig. 9 Maps of two more smooth domains. The "bean" originates with Reichel in 1981 [27] and the "blade" with Ellacott in 1978 [10]. The poles of the rational approximations match only roughly the poles and branch points of the exact maps.
The maximum back-and-forth error is 1.7 × 10 −6 , and the rms back-and-forth error is 8.7 × 10 −8 . Figure 9 shows two more conformal maps of regions with smooth boundaries taken from the classical literature of numerical conformal mapping. The for θ ∈ [0, 2π], was introduced by Reichel in the technical report version of [27] and considered also by Papamichael, et al. in [26]. The "blade" in the second row, defined by the boundary map 2 cos θ + i(sin θ + 2 cos 3 θ), was introduced by Ellacott [10] and considered also in [26,27]. Both of these mapping problems were discussed in [26] as examples in which the structure of nearby poles and other singularities might be analyzed and exploited for numerical approximation, just the opposite of the point of view of the present paper. The exact bean map has poles at ζ 1 ≈ −0.650 and ζ 2 ≈ 1.311, but the rational approximation r does not approximate these closely. On the left we see five poles, not one, with clear asymmetry about the real axis; as the authors of [26] point out, the map additionally has square root branch points at −0.566 ± 0.068i. As for ζ 2 , to the right of the bean, the approximation r shows three poles here, not a single pole. The pole near the real axis lies at 1.200 + 0.079i. The example of the blade region likewise illustrates that exact singularities are only a rough guide to what may be effective for rational approximation. Here Papamichael, et al. show that the exact map has simple poles at ±2.885∓ 1.584i, and these are matched to two digits of accuracy by poles of r at 2.908− 1.557i and −2.889 + 1.571i. As with the bean region, on the other hand, the portion of the figure with a concave boundary segment is complicated by simple poles at ±0.455 ± 1.902i with square root branch points nearby. These are matched only roughly by poles of r at 0.475 + 1.813i and −0.475 − 1.787i.

Accuracy
Our rational approximations readily attain 7-8 digits of accuracy almost everywhere in the domains, but fall to 2-4 digits close to certain boundary points. Let us call this the "corner effect" (though domains with smooth boundaries are not immune). As we shall now explain, this is actually not a limitation of our rational approximation method, but of the accuracy of the conformal mapping data we have been able to work with.
First we present a figure to illustrate the effect. Figure 1 showed a map f of the unit disk onto an L-shaped region, and the upper-left image of that figure plotted the unit disk together with the poles of the rational approximation r ≈ f . For the same problem, Figure 10 plots contours of the error |f (z)−r(z)|.
As explained in the caption, the contours confirm that the error is smaller than 10 −7 almost everywhere in the disk but much worse near the prevertices.
The corner effect does not result from inherent limitations in the accuracy of rational approximations, since the root-exponential convergence is very fast. 5 Our examples have shown that with ≈10 poles near each singularity, rational functions are well capable of 10 −3 accuracy, and there is no reason of approximation theory why this could not be improved to 10 −6 with ≈40 poles near each singularity.
The corner effect also does not result from limitations of the AAA algorithm. The algorithm does not produce an optimal approximant, but our experience shows that it reliably comes within one or two orders of magnitude of optimality on the discrete point set it works with. (For the function |x| 1/2 , this behaviour is illustrated in Figure 6.10 of [22]. One could formulate a AAA algorithm for a continuum, but we have not attempted this.) We hope that developments in AAA-related methods in the years ahead may further narrow the distance to optimality. One approach here may be the "AAA-Lawson" method considered in [22] and [12].
Instead, the corner effect is a consequence of inaccurate boundary data. As we now explain, to achieve an approximation r with r − f = O(ε) (the maximum norm on the domain) everywhere, it is necessary to sample the boundary map at distances O(ε) from prevertices or vertices with an accuracy of o(ε). (The "O" and "o" symbols here are heuristic, not precisely defined.) Partly because of the extreme ill-conditioning of conformal maps near corners, as well as in other contexts, and partly because of additional problems of accuracy of the SC Toolbox very near corners, this is hard to achieve when ε is much less than 10 −4 . Figure 11 illustrates the situation. The problem considered here is the map w = f (z) = z 1/4 of the right half-plane onto the wedge of angle π/4 about the positive real axis. In the left panel of the figure, this function has been approximated by the AAA algorithm with tolerance 10 −7 based on data at 200 points z j fixed so that the images f (z j ) are equispaced along the two sides of the wedge near w = 0 out to a distance 0.1. Thus the points z j themselves lie in the imaginary interval [−10 −4 i, 10 −4 i], and the two values closest to 0 are ±10 −12 i. The black dots in the figure are the data, and the blue curve is the AAA approximant. The behavior we see represents just what one would hope for. The curve closely matches the data and interpolates smoothly in-between.
This left panel of Figure 11 reflects a rational approximation with a maximal error on the order of 10 −4 . To improve this to a level O(ε) for some ε 10 −4 , it is clear that the mesh will have to be refined so that the data values near w = 0 have spacing O(ε). This means the corresponding z values will have minimal spacing O(ε 4 ). And here is where we see the difficulty in accuracy near corners. In 16-digit floating point arithmetic, spacings on the order of ε 4 will not be accurately computable for ε 1.  Fig. 11 On the left, successful AAA approximation near a z 1/4 singularity. On the right, the values z j have been perturbed on the scale of 10 −12 , and the interpolant loses accuracy near the corner. Moreover, it now has poles inside the approximation domain, implying that even though the error is still very small almost everywhere in the domain, its maximum is ∞.
effect, the right panel shows the same computation again, except that instead of data values f (z j ), the values are taken to be f (z j ), wherez j is z j plus a random complex perturbation of order 10 −12 . Now the rational approximation, while still excellent away from the vertex, has quite erroneous behavior nearby.
Based on these curves alone, one might guess that the approximation in the right panel of Figure 11 was, say, ten times less accurate than for the one on the left. However, the loop in the curve is a hint that something more fundamental is going wrong. In fact, this rational function has poles in the approximation domain-three of them, as it happens, with real parts on the order of 10 −8 and residues on the order of 10 −7 . From the point of view of the original problem, these poles are spurious; they have been introduced by the non-analytic perturbation of the fitting data. They will have negligible effect away from the vertex, but near the vertex, there is a portion of the approximation domain in which the error is infinite. One might not notice this in an application, but it can hardly be regarded as acceptable. The next section discusses spurious poles in more detail.
We believe that the inaccuracy of available boundary data, often due to the ill-conditioning of the conformal map, is usually what limits the accuracy of AAA approximants. If one could work with perfect data on grids clustered very finely near singularities, the rational approximants would have no trouble, but when the data are imperfect, one loses accuracy correspondingly. The SC Toolbox, unfortunately, seems to have additional difficulties near vertices that make the situation somewhat worse than what is inevitable due to illconditioning alone.
One might imagine that conformal maps of smooth domains, since there are no singularities on the boundary, would be exempt from these accuracy limitations. However, it is well known by practitioners of numerical conformal mapping that exponential global distortions arise in any map involving a narrow channel, the so-called "crowding phenomenon" (related to the St. Venant principle of elasticity theory) [3,25,32]. As a consequence, singularities will often lie exponentially close to a boundary even if they are not on the boundary exactly. We first saw the crowding phenomenon in Figure 1, where the pairs of prevertices corresponding to the ends of the L-shaped region came close to coalescing on the unit circle. In Figure 4 the effect is extreme enough that four prevertices appear to be just two. In the map of the ellipse in Figure 8, the same effect is reflected in how close the poles of s ≈ f −1 come to the unit circle, a distance of about 3.3 × 10 −5 . This function f −1 is analytic on the closed unit disk, but not on the disk of radius 1.0001. Such effects are typical in maps of interesting regions and have the consequence that whereas the difference between an analytic boundary and one with corners seems mathematically fundamental, in practice it may be rather small. So even with smooth domains, it is important to be alert to the possibility of inaccurate boundary data.

Spurious poles-Froissart doublets
The phenomenon of spurious poles, also known as Froissart doublets, is pervasive in rational approximation. These are poles in the domains of approximation with residues so small (typically on the scale of machine precision or some other tolerance when arising from computational errors, though they may also appear when there are no errors) that they have negligible effect on the approximation except in a small region. Nevertheless their presence implies that the maximum error is ∞. Another way to regard them is as pole-zero pairs that are so close together as to nearly cancel. This issue has been recognized since Perron in 1913 [24], and the name Froissart comes from the physicist Marcel Froissart in the 1960s. For discussions and references, see [29] and [33].
Often in practice, one might simply ignore the risk of spurious poles, on the theory that they are so localized that they will probably have no effect. However, this is not very satisfying, and of course there is always the possibility that one will be unlucky. In the work described in this paper, we have taken the view that it is never acceptable to have a pole in the approximation region, and if such a pole turns up in our experiments, we plot it as a black dot so large it cannot possibly be missed. For some time, we found quite a few such blots on our figures as we tried to achieve higher accuracies with data points clustered closely near vertices. Only eventually did we realize that what was going wrong was usually that the data values were not accurate enough, introducing essentially a non-analytic perturbation of the problem, as described in the last section. When an analytic function is approximated on a well-sampled boundary, poles in the interior rarely appear.
It is easy to see why the possibility of Froissart doublets is hard to exclude in rational approximation. Suppose r is a rational function that approximates a function f on a contour Γ with f − r = ε on Γ . If δ ε, then adding δ/(z − ζ) to r, or more or less equivalently multiplying it by (z − ζ + δ)/(z − ζ), will have little effect on the quality of the approximation. Thus the accuracy of an approximation alone gives no direct assurance of the absence of poles in any particular region of the complex plane.
Even if an analytic function is sampled exactly on an infinitely fine grid on the boundary, we know of no guarantee that a particular rational approximation must be free of poles in the interior. However, if the approximation is good on the boundary, one can argue as follows that at least the residue of such a pole must be correspondingly small. Suppose f is analytic on and inside Γ and r again satisfies f − r ≤ ε on Γ , with a single pole ζ enclosed by Γ . The function g(z) = (z − ζ)(f (z) − r(z)) is analytic interior to Γ , so by the maximum principle it satisfies |g(z)| ≤ Dε interior to Γ , where D is the diameter of Γ . But the residue of r at z = ζ is g(ζ), so this implies that this residue is bounded in absolute value by Dε.
In words, this argument shows that a function r that closely approximates f on Γ cannot have a "useful pole" interior to Γ (i.e., one that contributes significantly to matching the boundary data), only a relatively useless and harmless one with small residue. By more advanced forms of such reasoning one can establish various bounds on the impact of troublesome poles, of which the best known appears in the Nuttall-Pommerenke theorem for convergence of type (n, n) Padé approximants except on sets of capacity diminishing to zero as n → ∞ [2,33].

Conclusion
AAA rational approximations are startlingly fast and easy to apply, capturing singularities to good accuracy without the need for any analysis. 6 In a few seconds one typically gets a representation of both a conformal map f and its inverse f −1 that can be applied to map points back and forth in microseconds on a laptop. The main complication, as with most computing with rational functions, it that it is advisable to monitor whether spurious poles have appeared in the region of approximation. If so, they can usually be removed by loosening the convergence tolerance, improving the accuracy of the data, or refining the grid.
Our approximations are rational functions of type (n, n), typically with 10 ≤ n ≤ 100. To get comparable accuracy with polynomial approximations, at least in the case of conformal maps of polygons, one would need degrees in the millions.
We should emphasize the most important feature of the AAA algorithm, which has made this paper possible. It is not the method of choosing approximants that is most important, but the method of representing them in a rational barycentric form, which corresponds to a quotient of partial fractions rather than a quotient of polynomials. Most work with rational functions throughout the history of numerical computation has represented them as quotients of polynomials, but as analyzed in [22] and [12], this approach fails quickly for most interesting problems, unless one is prepared to use extended precision. The difficulty is that if r is treated as a quotient p/q of polynomials, then both p and q will have zeros clustering close to singularities or near-singularities, implying that both p and q vary exponentially in scale over the domain of interest. Information is quickly lost in floating point arithmetic.
Our discussion has concerned simply connected regions, but the same methods apply to conformal maps of multiply connected regions [1], and indeed, to analytic and meromorphic functions more generally.

Appendix. Rational approximation of x α
The following result establishes that rational approximation can be highly efficient at representing a conformal map near a corner. Let H denote the closed upper half of the unit disk and · H the supremum norm on H. In fact, the only property we use of H is that it is a bounded subset of the upper half-plane. Our proof is adapted from the argument for approximation of |x| on [−1, 1] given on pp. 211-212 of [33].
Note that the integrand decays exponentially at the rate e s(1−1/α) as s → +∞, and this is uniformly true for all values of x ∈ H since H is bounded. As for s → −∞, here the integrand decays exponentially at the rate e s for each x = 0, uniformly for all x.
Here n is a positive even number, and there are n terms in the sum, so r(x) is a rational function of x of type (n, n). Its poles are on the negative imaginary axis, so r is analytic in the upper half-plane. As reviewed in [35], the error |r(x)−x α | in the trapezoidal rule approximation can be decomposed into two parts. One part is introduced by terminating the sum at n < ∞, on the order of e −nh/2 . (By "on the order," we mean that the dominant exponential term is correct; there may be further lower-order algebraic factors.) The other part is introduced by the finite step size h > 0. According to Theorem 5.1 of [35], this will be of order e −2πd/h , where d is the half-width of the strip of analyticity of the integrand around the real s-axis.
To determine this half-width, we note that the denominator of (2) will be 0 when e πi/2+s/α is equal to −x, and for x in the upper half-plane, this can only happen when the argument of e s/α , namely the imaginary part of s/α, is at least as large as π/2 in absolute value. The half-width of the strip of analyticity is consequently d = πα/2, giving an error of e −απ 2 /h . We now choose h to balance the errors e −nh/2 and e −απ 2 /h . The balance occurs with h = π 2α/n, giving a convergence rate r n (x) − x α H exp(−π αn/2).
We use the inexact symbol " " since we have only tracked the exponential term, not lower-order algebraic factors, but this is enough to establish (2) for any value A < π α/2.
The constants in our argument are not optimal, and one reason is that the approximation (5) is valid (nonuniformly) throughout the upper half-plane, not just in H. We do not know the optimal constants, which appear to be different from those given in (1) for approximation of |x| α on [−1, 1]. Note that our convergence rate slows down to zero as α → 0, but this is also the case in (1).
Note that the poles of the approximation (5) cluster exponentially near x = 0, with exponentially decreasing residues, just as observed in our experiments.