skillfed

cody-special

High-precision error functions and normal distribution (Cody's algorithm)

cody-special v1.0.0 158.1K downloads/30d#10,737 on PyPI0
Permissive license MIT AGING released

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-special

uv

uv add cody-special

poetry

poetry add cody-special

Installing 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

License :: OSI Approved :: MIT LicenseProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.9

Tags

error function erf erfcnormal distribution cdf pdfchebyshev approximationstatistical functions pythoninverse normal quantilespecial functions mathcody algorithm implementation
special-functionsnumerical-methodsstatistics

More Mathematics packages