# \[ANN\] RationalFunctionApproximation.jl, v0.2

**URL:** https://discourse.julialang.org/t/ann-rationalfunctionapproximation-jl-v0-2/129078
**Category:** Package Announcements
**Tags:** announcement
**Created:** [May 16, 2025, 8:15pm UTC](https://discourse.julialang.org/t/ann-rationalfunctionapproximation-jl-v0-2/129078 "2025-05-16T20:15:42Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![tobydriscoll](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tobydriscoll/32/1843_2.png) [@tobydriscoll](https://discourse.julialang.org/u/tobydriscoll)
#### Post date: [May 16, 2025, 8:15pm UTC](https://discourse.julialang.org/t/ann-rationalfunctionapproximation-jl-v0-2/129078/1 "2025-05-16T20:15:42Z")

</div>

I am pleased to announce a new version of [RationalFunctionApproximation.jl](https://github.com/complexvariables/RationalFunctionApproximation.jl), a package for the automatic approximation of functions by ratios of polynomials.

Unlike polynomials, rational function interpolants can use arbitrary node locations at high degree without suffering from Runge instability. The approximations can be made accurate to ten digits or more on arbitrary domains in the complex plane, in addition to ordinary intervals, even for functions that have nearly singular behavior.

In addition to the continuum AAA algorithm that was implemented in v0.1, the package now offers (1) linear least-squares approximation with prescribed poles (a la Trefethen and Costa) and (2) an implementation of the greedy Thiele continued-fraction interpolation suggested by Celis. The latter is interesting as an O(n^2) alternative to the O(n^4) runtime of AAA, although its stability is less consistent at the moment.

In addition, the package plays nicely with extended precision and is easily called from Python.

I invite you to check [the documentation](https://complexvariables.github.io/RationalFunctionApproximation.jl/stable/). Enjoy!

 ![Approximation of log(x + 0.05i)](https://global.discourse-cdn.com/julialang/original/3X/4/e/4eb04608b72d533ae6776b3cb17688bffe3b95ba.png)

---

<div class="post-metadata">

### Author: ![tobydriscoll](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tobydriscoll/32/1843_2.png) [@tobydriscoll](https://discourse.julialang.org/u/tobydriscoll)
#### Post date: [September 3, 2026, 5:16pm UTC](https://discourse.julialang.org/t/ann-rationalfunctionapproximation-jl-v0-2/129078/2 "2026-09-03T17:16:10Z")

</div>

The [RationalFunctionApproximation.jl](https://github.com/complexvariables/RationalFunctionApproximation.jl) package is now at version 0.4.0. Changes over the past year+ have brought many speed improvements, especially to the Thiele continued fraction implementation.

Continued fractions are now 8-40 times faster than AAA across a wide range of experiments, and they have become the default choice in the package. There is also a [Python interface](https://github.com/complexvariables/pyratapprox) via JuliaCall. The RFA implementation of the AAA algorithm seems to be about twice as fast as the SciPy implementation—with continued fractions comfortably faster than both.

---

<div class="post-metadata">

### Author: ![linwaytin](https://avatars.discourse-cdn.com/v4/letter/l/898d66/32.png) [@linwaytin](https://discourse.julialang.org/u/linwaytin)
#### Post date: [September 4, 2026, 6:40am UTC](https://discourse.julialang.org/t/ann-rationalfunctionapproximation-jl-v0-2/129078/3 "2026-09-04T06:40:16Z")

</div>

Thanks for making this package. I am quite interested the new algorithms. Can you give more information?

BTW, it seems some citations in the algorithm page [Algorithms | RationalFunctionApproximation.jl](https://complexvariables.github.io/RationalFunctionApproximation.jl/stable/algorithms) have wrong numbers, like [6] should be [7]?

---

<div class="post-metadata">

### Author: ![homocarbonis](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/homocarbonis/32/223614_2.png) [@homocarbonis](https://discourse.julialang.org/u/homocarbonis)
#### Post date: [September 4, 2026, 9:29am UTC](https://discourse.julialang.org/t/ann-rationalfunctionapproximation-jl-v0-2/129078/4 "2026-09-04T09:29:16Z")

</div>

I’d not seen this package before but it looks really interesting. My work involves representing reaction kinetics as rational functions so having a tool to approximate arbitrary functions in the same form is potentially very useful.

---

<div class="post-metadata">

### Author: ![tobydriscoll](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tobydriscoll/32/1843_2.png) [@tobydriscoll](https://discourse.julialang.org/u/tobydriscoll)
#### Post date: [September 4, 2026, 12:39pm UTC](https://discourse.julialang.org/t/ann-rationalfunctionapproximation-jl-v0-2/129078/5 "2026-09-04T12:39:06Z")

</div>

Oof. Seems like I have a problem with DocumenterCitations. Thanks for the heads-up.

For the continued fractions, you can look at [this preprint](https://arxiv.org/abs/2510.07295). There’s are older papers cited there that deal with the more technical aspects of the theory, before the stability of the new approach to selecting nodes was appreciated.
