ellip 1.2.3

Elliptic integrals for Rust
Documentation

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 ellip::*;

fn ellipse_perimeter(a: f64, b: f64) -> Result<f64, StrErr> {
    Ok(8.0 * elliprg(0.0, a * a, b * b)?)
}

// Example: ellipse with semi-major axis 5, semi-minor axis 3
println!("{}", ellipse_perimeter(5.0, 3.0).unwrap()); // 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_zeta and heuman_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:

@article{Pornsiriprasert2026,
    doi = {10.21105/joss.09386}, 
    url = {https://doi.org/10.21105/joss.09386}, 
    year = {2026}, 
    publisher = {The Open Journal}, 
    volume = {11}, number = {118}, pages = {9386},
    author = {Pornsiriprasert, Sira}, 
    title = {Ellip: An Elliptic Integral Library for Rust}, 
    journal = {Journal of Open Source Software} } 

Learn more at docs.rs.