Skip to main content
Article
100%
HD

Imagine you need to draw a curve that follows a function with sudden spikes or “invisible” branches. Traditional polynomials often fail, creating the infamous Runge phenomenon: the curve wildly oscillates at the edges. This is where rational functions shine, combining numerators and denominators to capture spikes and branch cuts with near‑exponential convergence.

The Julia package RationalFunctionApproximation.jl takes these ideas to the next level. It implements the fastest versions of the AAA and Thiele algorithms, two rational‑approximation techniques that have reignited scientific interest. Moreover, it’s the only one offering arbitrary‑precision support, meaning it can handle numbers with hundreds of decimal places without losing accuracy.

Thanks to integration with the ComplexRegions.jl package, you can create compact representations of functions over real intervals, circles, or more elaborate regions in the complex plane. In practice, you get a short yet powerful formula that describes the function across the whole domain, saving computation time and memory.

For students of math, physics, or computer science, this tool opens doors to more realistic simulation projects, from drawing electromagnetic fields to modeling dynamic systems. And for coding enthusiasts, it’s a chance to experiment with Julia, the language rapidly conquering scientific computing.

Bonus
100%
HD

Rational functions are fractions of polynomials, f(x)=P(x)/Q(x), where P and Q are polynomials of varying degree. Unlike pure polynomials, rational functions can introduce poles (points where Q(x)=0) and thus model asymptotic behavior or branch‑cut discontinuities. The AAA (Adaptive Antoulas‑Anderson) algorithm iteratively builds a rational representation by minimizing the error over a sampled set of points, dynamically selecting the most informative “support points.” The Thiele method, based on continued fractions, is especially effective for raw data, constructing a continued‑fraction of increasing order that converges rapidly if the target function is meromorphic.

RationalFunctionApproximation.jl leverages Julia’s JIT compilation to optimise each algorithmic step, minimising multiprecision arithmetic operations. The library supports arbitrary precision via the BigFloat type, allowing it to surpass double‑precision limits (≈16 decimal digits) when handling functions with extremely fine features, such as nanometre‑wide spikes or high‑frequency oscillations.

Integration with ComplexRegions.jl enables the definition of complex domains through geometric descriptors (intervals, circles, ellipses, polygonal regions). The package automatically computes the most suitable conformal map, reducing approximation error on non‑convex regions. It also provides vectorised evaluation functions that exploit SIMD to evaluate the rational function on millions of points in a few milliseconds.

Theoretically, rational functions offer root‑exponential convergence for analytic functions on compact domains, i.e., the error decays like exp(-c·√n) where n is the total degree of the fraction. This is markedly faster than traditional polynomial convergence, typically O(1/n^k). The absence of Runge’s phenomenon is guaranteed by the fraction’s ability to place poles at critical points of the function, avoiding unwanted oscillations.

In summary, RationalFunctionApproximation.jl combines advanced algorithms, arbitrary precision, and complex‑domain support, making it an ideal tool for researchers and students needing accurate, high‑performance rational approximations.

Ask AI

Explore key aspects of this story with 3 quick insights

Source

Date Published:
Original Article arxiv.org
Fact-check verified on 02/03/2026 Primary Study / Original Source
Read our Editorial Guidelines & AI Ethics Policy
Creative Commons License CC BY-NC-SA 4.0

Keep exploring

Discover the full archive of science bites or head back to home

Riconnessione al server... Aggiornamento della sessione in corso
Connessione interrotta Impossibile stabilire il collegamento
Sessione aggiornata Ricarica per visualizzare i contenuti