Elliptic functions
for MATLAB, Octave
& Python

Full-precision implementations of elliptic integrals, Jacobi's elliptic and theta functions, Carlson symmetric forms and Weierstrass's — for MATLAB / Octave and Python (NumPy · PyTorch · JAX). No external toolboxes, tensor support throughout, complex-argument variants included.

View on GitHub
focus E(φ|m)
M/O
MATLAB / Octave R2019b+ · Octave 6.0+
% cd elliptic/matlab && setup
Py
Python NumPy · PyTorch · JAX · 3.10+
pip install elliptic-functions
MATLAB · Octave · Python Jacobi sn/cn/dn/am Elliptic integrals F, E, Π Carlson symmetric forms Weierstrass ℘, ζ, σ Bulirsch CEL Theta functions Tensor & complex support CUDA via gpuArray / PyTorch / JAX

Interactive Examples

Browse all →

Find a function

click any card for usage + numerical example
press /

API Reference

Every function is available in both MATLAB/Octave and Python with the same name and argument order. Signatures below show each call side-by-side. Use the language toggle in the nav bar to swap the default shown in the finder modal.

Cite this work

If you've used any routines in this package — MATLAB, Octave or Python — please cite:

@misc{elliptic,
  author       = {Moiseev I.},
  title        = {Elliptic functions for Matlab, Octave and Python},
  year         = {2008},
  publisher    = {GitHub},
  doi          = {10.5281/zenodo.48264},
  url          = {http://dx.doi.org/10.5281/zenodo.48264}
}

Contributors: @moiseevigor (Igor Moiseev, maintainer) · @drbitboy (Brian Carcich) · @wspr (Will Robertson)