Elliptic integrals for Rust
Ellip is a pure-Rust implementation of elliptic integrals. Ellip also provides less common functions like Bulirsch's cel and el. Some applications of the elliptic integrals include computing the lengths of plane curves, magnetism, astrophysics, and string theory.
Use Ellip-Rayon to parallelize and improve performance for large inputs. Ellip is also available for Python via EllipPy.
Quick Start
Start by installing Ellip, which is no_std by default.
>> cargo add ellip
Let's compute the perimeter of an ellipse.
use *;
// Example: ellipse with semi-major axis 5, semi-minor axis 3
println!; // 25.526998863398124
Learn more at doc.rs.
Features
- Legendre's complete integrals: the first, second, and third kinds (
ellipk,ellipe,ellippi), a combined routine (ellipke), and Legendre's type (ellipd) - Legendre's incomplete integrals: the first, second, and third kinds (
ellipf,ellipeinc,ellippiinc) and Legendre's type (ellipdinc) - Bulirsch's complete integrals: the general complete integral (
cel), and the first, second, and third kinds (cel1,cel2,cel3) - Bulirsch's incomplete integrals: the first, second, and third kinds (
el1,el2,el3) - Carlson's symmetric integrals: the first, second, and third kinds (
elliprf,elliprg,elliprj), and the degenerate integrals (elliprc,elliprd) - Miscellaneous functions:
jacobi_zetaandheuman_lambda
Testing
The full accuracy report, test datasets, and test generation scripts are available in the tests directory. The test and benchmark summary is available in TESTING.md. See how to reproduce the results in REPRODUCIBILITY.md.
Citation
The paper describing Ellip is published in the Journal of Open Source Software. If Ellip is helpful to your work, please consider citing it:
Pornsiriprasert, S., (2026). Ellip: An Elliptic Integral Library for Rust. Journal of Open Source Software, 11(118), 9386, https://doi.org/10.21105/joss.09386
Bibtex format:
Learn more at docs.rs.