Skip to main content

Fast C++ implementation of fractional calculus operators via pybind11

Project description

differintC

differintC is a high-performance C++ library with Python bindings for computing fractional differintegrals (derivatives and integrals of arbitrary real order) using numerical methods.

This package implements optimized versions of the Riemann–Liouville and Grünwald–Letnikov (GL) fractional differintegral operators, inspired by the original DifferInt project.

⚙️ Built with modern C++17 and exposed to Python via pybind11, this library is significantly faster than pure-Python equivalents, especially for large arrays and high-precision needs.


📦 Installation

pip install differintC

To build from source:

git clone https://github.com/your-username/differintC-project.git
cd differintC-project
pip install .

🚀 Usage

from differintC import RLpoint, RL, GLpoint, GL

# Example 1: Riemann–Liouville at a single point
result = RLpoint(0.5, lambda x: x**2)
print("RLpoint(0.5, x^2) =", result)

# Example 2: RL on a whole domain
import numpy as np
x = np.linspace(0, 1, 100)
f = x**2
out = RL(0.5, f)

# Example 3: Grünwald–Letnikov pointwise
gl_res = GLpoint(0.5, lambda x: np.sqrt(x))

# Example 4: Full array version (fastest)
gl_array = GL(0.5, lambda x: np.sqrt(x))

All functions support either a NumPy array or a Python callable as the f_name argument.


📚 Implemented Functions

Function Description
RLpoint Riemann–Liouville differintegral at a point
RL RL differintegral over a uniform domain
GLpoint Grünwald–Letnikov at a point (optimized)
GL Vectorized GL differintegral with FFT

⚖️ License and Credits

This package was inspired by and based on the original DifferInt project. We thank the authors for their foundational work in fractional calculus.

Licensed under MIT.


🛠 Development Notes

See the todo list 1 for the development roadmap and planned features. Contributions are welcome.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

differintc-0.0.2.3.tar.gz (2.0 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

differintc-0.0.2.3-cp313-cp313-win_amd64.whl (1.1 MB view details)

Uploaded CPython 3.13Windows x86-64

File details

Details for the file differintc-0.0.2.3.tar.gz.

File metadata

  • Download URL: differintc-0.0.2.3.tar.gz
  • Upload date:
  • Size: 2.0 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.3

File hashes

Hashes for differintc-0.0.2.3.tar.gz
Algorithm Hash digest
SHA256 8840b6bf4ac37663026f1d69bc0f00022c0e435020a5b322ba40f256601eee4c
MD5 ed683f6832d06b4073785c6fb0d93928
BLAKE2b-256 8b0beff1dea7530dbe85b12f958a50b7fe005c04f17268ce211029aed962c18f

See more details on using hashes here.

File details

Details for the file differintc-0.0.2.3-cp313-cp313-win_amd64.whl.

File metadata

File hashes

Hashes for differintc-0.0.2.3-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 26820ed3a853d6b9c72641211e206a80cdf54780298b993ec6c1b3691b108b83
MD5 cd9009dc1c1a47356e1faeff44d47b89
BLAKE2b-256 a8bdceb332e114b9f9f8face07fe8588ef3b0f12095209b5db85f392352966a3

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page