cody-special
High-precision error functions and normal distribution (Cody's algorithm)
What it is and what it does
cody-special is a pure-Python library that implements error functions and normal distribution functions using W.J. Cody's rational Chebyshev approximation method from 1969. It provides erf, erfc, erfcx (scaled complementary error function), and standard normal PDF, CDF, and inverse CDF functions. The package has no external runtime dependencies and installs as a simple wheel.
The library is designed for applications requiring high-precision special function evaluation—particularly in quantitative finance, statistics, and scientific computing where accurate error and normal distribution calculations are critical. It is a stable, single-release package with no known vulnerabilities, making it suitable for incorporation into production systems where the specific approximation method or numerical properties are required.
Use it for:
- Computing error function values in signal processing or physics simulations requiring Cody's approximation method.
- Evaluating normal distribution CDF and quantiles in statistical analysis or hypothesis testing workflows.
- Quantitative finance applications needing precise inverse normal CDF for option pricing or risk models.
- Replacing scipy.special calls when a lightweight, dependency-free implementation is preferred.
- Implementing algorithms that explicitly require Cody's rational Chebyshev approximations for reproducibility.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Provides high-precision implementations of error functions (erf, erfc, erfcx) and normal distribution functions (PDF, CDF, inverse CDF) using W.J. Cody's rational Chebyshev approximations.
Yes, if you need high-precision error or normal distribution functions and prefer a lightweight, dependency-free implementation. The package is stable and permissively licensed. Install with caution if you expect active maintenance—it is aging with no recent development activity, so treat it as a mature, self-contained tool rather than an actively evolving library.
Install
cody-special on PyPI
pip
pip install cody-specialuv
uv add cody-specialpoetry
poetry add cody-specialInstalling cody-special
Before you install
Low install friction with no runtime dependencies. Package is aging (213 days since release) with a single recent commit but no active development signal; suitable for stable, self-contained use.
License in practice
MIT license permits unrestricted use, modification, and distribution in commercial and private projects with minimal obligations.
Quickstart
pip install cody-special
from cody_special import erf_cody, norm_cdf, inverse_norm_cdf
erf_cody(1.0) # ~ 0.8427
norm_cdf(0.0) # = 0.5
inverse_norm_cdf(0.5) # = 0.0
Requires Python 3.9 or later (supports up to 3.13).
Verify before relying
- Numerical accuracy and precision claims relative to reference implementations or standard libraries.
- Performance characteristics compared to scipy.special or numpy equivalents.
- Whether the package is actively maintained or in maintenance-only mode given aging status.
Package facts
| License | MIT (permissive) |
| Python support | supports the current Python release (<4.0,>=3.9) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | none |
| Maintenance | aging — 213 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 158,052/month — #10,737 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: cody_special-1.0.0-py3-none-any.whl
Keywords: error function, erf, erfc, normal distribution, cdf, statistics
Tags
More Mathematics packages
NetworkX provides data structures and…
permissive · top 1,000 on PyPI
kiwisolverkiwisolver is a Python binding to a fast C++…
permissive · top 1,000 on PyPI
sympySymPy is a Python library for symbolic…
permissive · top 1,000 on PyPI
contourpyContourPy calculates contours of 2D…
permissive · top 1,000 on PyPI
torchPyTorch provides GPU-accelerated tensor…
permissive · top 1,000 on PyPI
onnxruntimeonnxruntime loads and executes Open Neural…
permissive · top 1,000 on PyPI
pytensor-distributionsPyTensor-distributions provides a collection of…
permissive · top 15,000 on PyPI
momentchi2Computes the cumulative distribution function…
permissive · top 15,000 on PyPI
py-lets-be-rationalComputes implied volatility from option prices…
permissive · top 15,000 on PyPI
autograd-gammaProvides autograd-compatible derivatives for…
permissive · top 5,000 on PyPI
quantile-forestQuantile regression forests for estimating…
permissive · top 15,000 on PyPI
py-vollibCalculates option prices, implied volatility,…
permissive · top 15,000 on PyPI
piecewise-rationalPerforms shape-preserving piecewise rational…
permissive · top 15,000 on PyPI
vollibvollib calculates option prices, implied…
permissive · top 15,000 on PyPI