High performance implementation of the Mittag-Leffler function
Project description
mittagleffler
This library implements the two-parameter Mittag-Leffler function.
Currently only the algorithm described in the paper by Roberto Garrapa (2015) is implemented. This seems to be the most accurate and computationally efficient method to date for evaluating the Mittag-Leffler function.
Links
- Documentation: Rust (docs.rs) and Python (readthedocs.io).
- Code: Github.
- License: MIT (see
LICENSES/MIT.txt).
Other implementations
- ml.m (MATLAB): implements the three-parameter Mittag-Leffler function.
- ml_matrix.m (MATLAB): implements the matrix-valued two-parameter Mittag-Leffler function.
- MittagLeffler.jl (Julia): implements the two-parameter Mittag-Leffler function and its derivative.
- MittagLeffler (R): implements the three-parameter Mittag-Leffler function.
- mittag-leffler (Python): implements the three-parameter Mittag-Leffler function.
- mlf (Fortran 90): implements the three-parameter Mittag-Leffler function.
- mlpade (MATLAB): implements the two-parameter Mittag-Leffler function.
- MittagLeffler (Stata): implements the three-parameter Mittag-Leffler function.
- MittagLefflerE (Mathematica): implements the two-parameter Mittag-Leffler function.
Rust Crate
The library is available as a Rust crate that implements the main algorithms. Evaluating the Mittag-Leffler function can be performed directly by
use mittagleffler::MittagLeffler;
let alpha = 0.75;
let beta = 1.25;
let z = Complex64::new(1.0, 2.0);
println!("E({}; {}, {}) = {}", z, alpha, beta, z.mittag_leffler(alpha, beta));
let z: f64 = 3.1415;
println!("E({}; {}, {}) = {}", z, alpha, beta, z.mittag_leffler(alpha, beta));
This method will call the best underlying algorithm and takes care of any special
cases that are known in the literature, e.g. for (alpha, beta) = (1, 1) we
know that the Mittag-Leffler function is equivalent to the standard exponential.
To call a specific algorithm, we can do
use mittagleffler::GarrappaMittagLeffler
let eps = 1.0e-8;
let ml = GarrappaMittagLeffler::new(eps);
let z = Complex64::new(1.0, 2.0);
println!("E({}; {}, {}) = {}",z, alpha, beta, ml.evaluate(z, alpha, beta));
The algorithm from Garrappa (2015) has several parameters that can be tweaked for better performance or accuracy. They can be found in the documentation of the structure, but should not be changed unless there is good reason!
Python Bindings
The library also has Python bindings (using pyo3)
that can be found in the python directory. The bindings are written to work
with scalars and with numpy arrays equally. For example
import numpy as np
from pymittagleffler import mittag_leffler
alpha, beta = 2.0, 2.0
z = np.linspace(0.0, 1.0, 128)
result = mittag_leffler(z, alpha, beta)
These are available on PyPI under the name pymittagleffler.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distributions
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pymittagleffler-0.2.0.tar.gz.
File metadata
- Download URL: pymittagleffler-0.2.0.tar.gz
- Upload date:
- Size: 264.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
94fe967df4b111f7aae5eefb54b2d7532f9ac7d77cb08396ada1d755496b4df8
|
|
| MD5 |
ca528a219273012bac09f570893a7e18
|
|
| BLAKE2b-256 |
8cfcc087db872e0534cf5adcc63adc4afec3f1ad4efbca746466e8df3e1549f1
|
Provenance
The following attestation bundles were made for pymittagleffler-0.2.0.tar.gz:
Publisher:
wheels.yml on alexfikl/mittagleffler
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pymittagleffler-0.2.0.tar.gz -
Subject digest:
94fe967df4b111f7aae5eefb54b2d7532f9ac7d77cb08396ada1d755496b4df8 - Sigstore transparency entry: 1134883071
- Sigstore integration time:
-
Permalink:
alexfikl/mittagleffler@de86d8a2bfdfbb4f93ce25ad05564ff8ed395b40 -
Branch / Tag:
refs/tags/v0.2.0 - Owner: https://github.com/alexfikl
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
wheels.yml@de86d8a2bfdfbb4f93ce25ad05564ff8ed395b40 -
Trigger Event:
push
-
Statement type:
File details
Details for the file pymittagleffler-0.2.0-cp310-abi3-win_amd64.whl.
File metadata
- Download URL: pymittagleffler-0.2.0-cp310-abi3-win_amd64.whl
- Upload date:
- Size: 196.2 kB
- Tags: CPython 3.10+, Windows x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
87c1ebf2c604c2bfe3b72a2c1da2e86136bb1cb0451b7c5515b2509c9811ced9
|
|
| MD5 |
b43f7febd09dee000423a63057aba633
|
|
| BLAKE2b-256 |
1604c0cc91742e11d6ee2dc4f86891896a2dd23063f1fad092cfad86e35eec3e
|
Provenance
The following attestation bundles were made for pymittagleffler-0.2.0-cp310-abi3-win_amd64.whl:
Publisher:
wheels.yml on alexfikl/mittagleffler
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pymittagleffler-0.2.0-cp310-abi3-win_amd64.whl -
Subject digest:
87c1ebf2c604c2bfe3b72a2c1da2e86136bb1cb0451b7c5515b2509c9811ced9 - Sigstore transparency entry: 1134883099
- Sigstore integration time:
-
Permalink:
alexfikl/mittagleffler@de86d8a2bfdfbb4f93ce25ad05564ff8ed395b40 -
Branch / Tag:
refs/tags/v0.2.0 - Owner: https://github.com/alexfikl
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
wheels.yml@de86d8a2bfdfbb4f93ce25ad05564ff8ed395b40 -
Trigger Event:
push
-
Statement type:
File details
Details for the file pymittagleffler-0.2.0-cp310-abi3-manylinux_2_24_x86_64.whl.
File metadata
- Download URL: pymittagleffler-0.2.0-cp310-abi3-manylinux_2_24_x86_64.whl
- Upload date:
- Size: 304.2 kB
- Tags: CPython 3.10+, manylinux: glibc 2.24+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
46f3753ec457633b26542c6b08381008da547322de16a5536a7d20f935c95013
|
|
| MD5 |
72d617029f13e45f3c4bb2854a5d21c8
|
|
| BLAKE2b-256 |
ec18a0fa8f9ba90868f7ee7955c7700713cdca7e316c8b2eb8710e18ff636cbb
|
Provenance
The following attestation bundles were made for pymittagleffler-0.2.0-cp310-abi3-manylinux_2_24_x86_64.whl:
Publisher:
wheels.yml on alexfikl/mittagleffler
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pymittagleffler-0.2.0-cp310-abi3-manylinux_2_24_x86_64.whl -
Subject digest:
46f3753ec457633b26542c6b08381008da547322de16a5536a7d20f935c95013 - Sigstore transparency entry: 1134883132
- Sigstore integration time:
-
Permalink:
alexfikl/mittagleffler@de86d8a2bfdfbb4f93ce25ad05564ff8ed395b40 -
Branch / Tag:
refs/tags/v0.2.0 - Owner: https://github.com/alexfikl
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
wheels.yml@de86d8a2bfdfbb4f93ce25ad05564ff8ed395b40 -
Trigger Event:
push
-
Statement type:
File details
Details for the file pymittagleffler-0.2.0-cp310-abi3-manylinux_2_24_aarch64.whl.
File metadata
- Download URL: pymittagleffler-0.2.0-cp310-abi3-manylinux_2_24_aarch64.whl
- Upload date:
- Size: 280.3 kB
- Tags: CPython 3.10+, manylinux: glibc 2.24+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
06d17358792ef8d4b189cdfb1b803bca2cad65a6f43046bb2db2c082260b40e6
|
|
| MD5 |
1d70e8f5a14cfcbcad088ea0427d6875
|
|
| BLAKE2b-256 |
9311e682f5aadcc021446069ab4036126b4f41d847267e305960e0bfc3006f3a
|
Provenance
The following attestation bundles were made for pymittagleffler-0.2.0-cp310-abi3-manylinux_2_24_aarch64.whl:
Publisher:
wheels.yml on alexfikl/mittagleffler
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pymittagleffler-0.2.0-cp310-abi3-manylinux_2_24_aarch64.whl -
Subject digest:
06d17358792ef8d4b189cdfb1b803bca2cad65a6f43046bb2db2c082260b40e6 - Sigstore transparency entry: 1134883220
- Sigstore integration time:
-
Permalink:
alexfikl/mittagleffler@de86d8a2bfdfbb4f93ce25ad05564ff8ed395b40 -
Branch / Tag:
refs/tags/v0.2.0 - Owner: https://github.com/alexfikl
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
wheels.yml@de86d8a2bfdfbb4f93ce25ad05564ff8ed395b40 -
Trigger Event:
push
-
Statement type:
File details
Details for the file pymittagleffler-0.2.0-cp310-abi3-macosx_11_0_arm64.whl.
File metadata
- Download URL: pymittagleffler-0.2.0-cp310-abi3-macosx_11_0_arm64.whl
- Upload date:
- Size: 261.0 kB
- Tags: CPython 3.10+, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d26c63678821099f59323f0aacaef5dd98c567acfb78efca9d6dbe2c9e6a1f7e
|
|
| MD5 |
2c1f0a9c0a9bd4c6cd51c1c115e0f201
|
|
| BLAKE2b-256 |
c827c8ae4552057d1075d7b0d9afaf15a2295690bb65f801eb3a684f201d8090
|
Provenance
The following attestation bundles were made for pymittagleffler-0.2.0-cp310-abi3-macosx_11_0_arm64.whl:
Publisher:
wheels.yml on alexfikl/mittagleffler
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pymittagleffler-0.2.0-cp310-abi3-macosx_11_0_arm64.whl -
Subject digest:
d26c63678821099f59323f0aacaef5dd98c567acfb78efca9d6dbe2c9e6a1f7e - Sigstore transparency entry: 1134883175
- Sigstore integration time:
-
Permalink:
alexfikl/mittagleffler@de86d8a2bfdfbb4f93ce25ad05564ff8ed395b40 -
Branch / Tag:
refs/tags/v0.2.0 - Owner: https://github.com/alexfikl
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
wheels.yml@de86d8a2bfdfbb4f93ce25ad05564ff8ed395b40 -
Trigger Event:
push
-
Statement type: