special
38 memberslucid.special`lucid.special` — special mathematical functions.
This sub-package adds functions that complement the elementary math
already available at the top level (erf / sinc / lgamma /
digamma / i0 / log1p / logit / xlogy / erfc /
erfinv / expm1 …). Per H8 there is exactly one canonical
path per op — those stay accessible only at the top level, and the
extra entries below stay accessible only via lucid.special.<name>.
Implemented (all pure-Python composites over engine ops — no C++ work):
erfcx— scaled complementary error:exp(x²) · erfc(x)i0e— exponentially-scaled modified Bessel I₀:exp(-|x|) · i0(x)i1— modified Bessel of order 1 (Abramowitz polynomial)i1e— exponentially-scaledi1ndtr— normal CDFΦ(x) = ½·(1 + erf(x/√2))ndtri— inverse normal CDF (Beasley-Springer-Moro)log_ndtr— numerically-stablelog(Φ(x))xlog1py—x · log1p(y)with0·log1p(0) = 0entr— entropy element-x · log(x), 0 at x=0multigammaln— log of the multivariate gamma functionpolygamma— derivatives ofdigamma; n=0 falls through tolucid.digamma, n=1 (trigamma) uses the standard series; n ≥ 2 raisesNotImplementedErrorspherical_bessel_j0—sin(x)/xwith continuous extension at 0
Deferred (would need oscillatory / Hurwitz-zeta approximations or
arbitrary-order Bessel machinery — enable in a follow-up if anyone
actually asks): iv, ive, bessel_j0/j1/y0/y1,
modified_bessel_k0/k1 (and scaled variants), zeta, the
orthogonal-polynomial family (Chebyshev / Legendre / Hermite /
Laguerre / Jacobi).
Functions
erfcx→ TensorScaled complementary error function.
i0e→ TensorExponentially scaled modified Bessel function of order 0.
i1→ TensorModified Bessel function of the first kind, order 1.
i1e→ TensorExponentially scaled modified Bessel function of order 1.
ndtr→ TensorStandard normal cumulative distribution function.
log_ndtr→ TensorNumerically stable logarithm of the standard normal CDF.
ndtri→ TensorInverse standard normal CDF (probit / quantile function).
xlog1py→ TensorSafe product with limit-convention zero handling.
entr→ TensorElement-wise entropy kernel .
multigammaln→ TensorLogarithm of the multivariate gamma function .
polygamma→ TensorPolygamma function .
spherical_bessel_j0→ TensorSpherical Bessel function of the first kind, order 0.
chebyshev_polynomial_t→ TensorChebyshev polynomial of the first kind, .
chebyshev_polynomial_u→ TensorChebyshev polynomial of the second kind, .
chebyshev_polynomial_v→ TensorChebyshev polynomial of the third kind, .
chebyshev_polynomial_w→ TensorChebyshev polynomial of the fourth kind, .
shifted_chebyshev_polynomial_t→ TensorShifted Chebyshev T polynomial on .
shifted_chebyshev_polynomial_u→ TensorShifted Chebyshev U polynomial on .
shifted_chebyshev_polynomial_v→ TensorShifted Chebyshev V polynomial on .
shifted_chebyshev_polynomial_w→ TensorShifted Chebyshev W polynomial on .
hermite_polynomial_h→ TensorPhysicist's Hermite polynomial .
hermite_polynomial_he→ TensorProbabilist's Hermite polynomial .
legendre_polynomial_p→ TensorLegendre polynomial .
laguerre_polynomial_l→ TensorLaguerre polynomial .
bessel_j0→ TensorBessel function of the first kind, order 0.
bessel_j1→ TensorBessel function of the first kind, order 1.
bessel_y0→ TensorBessel function of the second kind, order 0.
bessel_y1→ TensorBessel function of the second kind, order 1.
modified_bessel_k0→ TensorModified Bessel function of the second kind, order 0.
scaled_modified_bessel_k0→ TensorExponentially scaled modified Bessel : .
modified_bessel_k1→ TensorModified Bessel function of the second kind, order 1.
scaled_modified_bessel_k1→ TensorExponentially scaled modified Bessel : .
zeta→ TensorHurwitz zeta function .
gammaln→ TensorNatural logarithm of the absolute value of the gamma function.
psi→ TensorDigamma function .
expit→ TensorLogistic sigmoid (expit) function .
modified_bessel_i0→ TensorModified Bessel function of the first kind, order 0.
modified_bessel_i1→ TensorModified Bessel function of the first kind, order 1.