special_functions¶
shortfx.fxNumeric.special_functions
¶
Special mathematical functions and orthogonal polynomials.
This module implements classical special functions from Murray R. Spiegel's Mathematical Handbook of Formulas and Tables: orthogonal polynomials (Legendre, Hermite, Laguerre, Chebyshev), Bernoulli/Euler numbers, elliptic integrals, the Riemann zeta function, and related functions.
Functions¶
abel_polynomial(n: int, x: float, a: float = 1.0) -> float
¶
Compute the n-th Abel polynomial p_n(x; a) = x(x - na)^{n-1}.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
n
|
int
|
Non-negative integer. |
required |
x
|
float
|
Variable. |
required |
a
|
float
|
Parameter (default 1.0). |
1.0
|
Returns:
| Type | Description |
|---|---|
float
|
p_n(x; a). |
Raises:
| Type | Description |
|---|---|
TypeError
|
If n is not int or x/a are not numeric. |
ValueError
|
If n < 0. |
Usage Example
abel_polynomial(3, 2.0) 2.0
Complexity: O(1)
Source code in shortfx/fxNumeric/special_functions.py
airy_ai(x: float) -> float
¶
Computes the Airy function Ai(x) via power-series/asymptotic expansion.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
x
|
float
|
Evaluation point. |
required |
Returns:
| Type | Description |
|---|---|
float
|
Value of Ai(x). |
Raises:
| Type | Description |
|---|---|
TypeError
|
If x is not numeric. |
Example
round(airy_ai(0), 6) 0.355028
Complexity: O(n) series terms.
Source code in shortfx/fxNumeric/special_functions.py
airy_bi(x: float) -> float
¶
Computes the Airy function Bi(x) via power-series expansion.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
x
|
float
|
Evaluation point. |
required |
Returns:
| Type | Description |
|---|---|
float
|
Value of Bi(x). |
Raises:
| Type | Description |
|---|---|
TypeError
|
If x is not numeric. |
Example
round(airy_bi(0), 6) 0.614927
Complexity: O(n) series terms.
Source code in shortfx/fxNumeric/special_functions.py
anger_j(nu: float, x: float, n_points: int = 1000) -> float
¶
Anger function J_ν(x) = (1/π) ∫_0^π cos(νθ - x sinθ) dθ.
Generalizes the Bessel function to non-integer orders via integral representation.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
nu
|
float
|
Order (real). |
required |
x
|
float
|
Argument. |
required |
n_points
|
int
|
Quadrature points (default 1000). |
1000
|
Returns:
| Type | Description |
|---|---|
float
|
Value of the Anger function. |
Example
round(anger_j(0, 0.0), 6) 1.0
Complexity: O(n_points)
Source code in shortfx/fxNumeric/special_functions.py
associated_legendre(n: int, m: int, x: float) -> float
¶
Evaluates the associated Legendre function P_n^m(x).
Uses the recurrence relation starting from P_m^m.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
n
|
int
|
Degree (>= 0). |
required |
m
|
int
|
Order (0 <= m <= n). |
required |
x
|
float
|
Evaluation point in [-1, 1]. |
required |
Returns:
| Type | Description |
|---|---|
float
|
Value of P_n^m(x). |
Raises:
| Type | Description |
|---|---|
TypeError
|
If n or m are not integers or x is not numeric. |
ValueError
|
If n < 0, m < 0, m > n, or |x| > 1. |
Example
associated_legendre(1, 1, 0.5) -0.8660254037844386
Complexity: O(n)
Source code in shortfx/fxNumeric/special_functions.py
bell_number(n: int) -> int
¶
Compute the n-th Bell number using the Bell triangle.
B_n counts the number of partitions of a set of n elements.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
n
|
int
|
Non-negative integer. |
required |
Returns:
| Type | Description |
|---|---|
int
|
The n-th Bell number. |
Raises:
| Type | Description |
|---|---|
TypeError
|
If n is not an integer. |
ValueError
|
If n < 0. |
Usage Example
bell_number(5) 52
Complexity: O(n²)
Source code in shortfx/fxNumeric/special_functions.py
bernoulli_number(n: int) -> float
¶
Computes the n-th Bernoulli number B_n using the Akiyama-Tanigawa algorithm.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
n
|
int
|
Index (>= 0). |
required |
Returns:
| Type | Description |
|---|---|
float
|
The n-th Bernoulli number as a float. |
Raises:
| Type | Description |
|---|---|
TypeError
|
If n is not an integer. |
ValueError
|
If n < 0. |
Example
bernoulli_number(0) 1.0 bernoulli_number(1) -0.5 bernoulli_number(2) 0.16666666666666666
Complexity: O(n^2)
Source code in shortfx/fxNumeric/special_functions.py
bernoulli_polynomial(n: int, x: float) -> float
¶
Evaluates the n-th Bernoulli polynomial B_n(x).
B_n(x) = sum_{k=0}^{n} C(n,k) B_k x^{n-k}.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
n
|
int
|
Degree (>= 0). |
required |
x
|
float
|
Evaluation point. |
required |
Returns:
| Type | Description |
|---|---|
float
|
Value of B_n(x). |
Raises:
| Type | Description |
|---|---|
TypeError
|
If n is not an integer or x is not numeric. |
ValueError
|
If n < 0. |
Example
bernoulli_polynomial(0, 0.5) 1.0 bernoulli_polynomial(1, 0.5) 0.0
Complexity: O(n^2) due to Bernoulli numbers.
Source code in shortfx/fxNumeric/special_functions.py
bernstein_polynomial(n: int, k: int, t: float) -> float
¶
Evaluate the Bernstein basis polynomial B_{n,k}(t).
Description
B_{n,k}(t) = C(n,k) · t^k · (1−t)^{n−k}. Bernstein polynomials form the basis of Bézier curves and surfaces in computer graphics and CAD.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
n
|
int
|
Degree of the polynomial (>= 0). |
required |
k
|
int
|
Index (0 <= k <= n). |
required |
t
|
float
|
Evaluation point, typically in [0, 1]. |
required |
Returns:
| Type | Description |
|---|---|
float
|
Value of B_{n,k}(t). |
Raises:
| Type | Description |
|---|---|
TypeError
|
If n or k are not integers, or t is not numeric. |
ValueError
|
If n < 0 or k not in [0, n]. |
Example
bernstein_polynomial(3, 1, 0.5) 0.375 bernstein_polynomial(4, 2, 0.5) 0.375
Complexity: O(n) for the binomial coefficient computation.
Source code in shortfx/fxNumeric/special_functions.py
bessel_j(n: int, x: float, terms: int = 80) -> float
¶
Computes the Bessel function of the first kind J_n(x) via power series.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
n
|
int
|
Order of the Bessel function (>= 0). |
required |
x
|
float
|
Evaluation point. |
required |
terms
|
int
|
Number of series terms (default 80). |
80
|
Returns:
| Type | Description |
|---|---|
float
|
Value of J_n(x). |
Raises:
| Type | Description |
|---|---|
TypeError
|
If n is not an integer or x is not numeric. |
ValueError
|
If n < 0. |
Example
round(bessel_j(0, 0), 6) 1.0 round(bessel_j(1, 0), 6) 0.0
Complexity: O(terms)
Source code in shortfx/fxNumeric/special_functions.py
bessel_y(n: int, x: float, terms: int = 80) -> float
¶
Computes the Bessel function of the second kind Y_n(x) (Neumann function).
Uses the relation Y_n(x) = (J_n(x) cos(nπ) - J_{-n}(x)) / sin(nπ) for non-integer-like computation, with direct series for integer n.
For integer n, uses the limiting form via numerical differentiation.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
n
|
int
|
Order of the Bessel function (>= 0). |
required |
x
|
float
|
Evaluation point (x > 0). |
required |
terms
|
int
|
Number of series terms (default 80). |
80
|
Returns:
| Type | Description |
|---|---|
float
|
Value of Y_n(x). |
Raises:
| Type | Description |
|---|---|
TypeError
|
If n is not an integer or x is not numeric. |
ValueError
|
If n < 0 or x <= 0. |
Example
round(bessel_y(0, 1.0), 4) 0.0883
Complexity: O(terms * n)
Source code in shortfx/fxNumeric/special_functions.py
1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 | |
beta_function(a: float, b: float) -> float
¶
Computes the beta function B(a, b) = Gamma(a)*Gamma(b)/Gamma(a+b).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
a
|
float
|
First parameter (> 0). |
required |
b
|
float
|
Second parameter (> 0). |
required |
Returns:
| Type | Description |
|---|---|
float
|
Value of B(a, b). |
Raises:
| Type | Description |
|---|---|
TypeError
|
If a or b are not numeric. |
ValueError
|
If a <= 0 or b <= 0. |
Example
round(beta_function(2, 3), 10) 0.0833333333
Complexity: O(1)
Source code in shortfx/fxNumeric/special_functions.py
catalan_number(n: int) -> int
¶
Compute the n-th Catalan number C_n = (2n)! / ((n+1)! · n!).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
n
|
int
|
Non-negative integer. |
required |
Returns:
| Type | Description |
|---|---|
int
|
The n-th Catalan number. |
Raises:
| Type | Description |
|---|---|
TypeError
|
If n is not an integer. |
ValueError
|
If n < 0. |
Usage Example
catalan_number(5) 42
Complexity: O(n)
Source code in shortfx/fxNumeric/special_functions.py
central_binomial_coefficient(n: int) -> int
¶
Compute the central binomial coefficient C(2n, n).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
n
|
int
|
Non-negative integer. |
required |
Returns:
| Type | Description |
|---|---|
int
|
C(2n, n). |
Raises:
| Type | Description |
|---|---|
TypeError
|
If n is not an integer. |
ValueError
|
If n < 0. |
Usage Example
central_binomial_coefficient(5) 252
Complexity: O(n)
Source code in shortfx/fxNumeric/special_functions.py
chebyshev_polynomial_first(n: int, x: float) -> float
¶
Evaluates the Chebyshev polynomial of the first kind T_n(x).
Uses the recurrence T_{n+1}(x) = 2x T_n(x) - T_{n-1}(x).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
n
|
int
|
Degree (>= 0). |
required |
x
|
float
|
Evaluation point, typically in [-1, 1]. |
required |
Returns:
| Type | Description |
|---|---|
float
|
Value of T_n(x). |
Raises:
| Type | Description |
|---|---|
TypeError
|
If n is not an integer or x is not numeric. |
ValueError
|
If n < 0. |
Example
chebyshev_polynomial_first(0, 0.5) 1.0 chebyshev_polynomial_first(2, 0.5) -0.5
Complexity: O(n)
Source code in shortfx/fxNumeric/special_functions.py
chebyshev_polynomial_second(n: int, x: float) -> float
¶
Evaluates the Chebyshev polynomial of the second kind U_n(x).
Uses the recurrence U_{n+1}(x) = 2x U_n(x) - U_{n-1}(x).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
n
|
int
|
Degree (>= 0). |
required |
x
|
float
|
Evaluation point, typically in [-1, 1]. |
required |
Returns:
| Type | Description |
|---|---|
float
|
Value of U_n(x). |
Raises:
| Type | Description |
|---|---|
TypeError
|
If n is not an integer or x is not numeric. |
ValueError
|
If n < 0. |
Example
chebyshev_polynomial_second(0, 0.5) 1.0 chebyshev_polynomial_second(2, 0.5) 0.0
Complexity: O(n)
Source code in shortfx/fxNumeric/special_functions.py
clausen_function(x: float, terms: int = 100) -> float
¶
Compute the Clausen function Cl₂(x) = -∫₀ˣ ln|2 sin(t/2)| dt.
Uses Fourier series: Cl₂(x) = Σ_{k=1}^{N} sin(kx)/k².
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
x
|
float
|
Input angle in radians. |
required |
terms
|
int
|
Number of series terms (default 100). |
100
|
Returns:
| Type | Description |
|---|---|
float
|
Cl₂(x). |
Raises:
| Type | Description |
|---|---|
TypeError
|
If x is not numeric. |
Usage Example
round(clausen_function(1.0), 4) 1.0139
Complexity: O(terms)
Source code in shortfx/fxNumeric/special_functions.py
complementary_error_function(x: float) -> float
¶
Compute the complementary error function erfc(x) = 1 - erf(x).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
x
|
float
|
Input value. |
required |
Returns:
| Type | Description |
|---|---|
float
|
erfc(x). |
Raises:
| Type | Description |
|---|---|
TypeError
|
If x is not numeric. |
Usage Example
round(complementary_error_function(1.0), 4) 0.1573
Complexity: O(N) where N ≈ 50 terms
Source code in shortfx/fxNumeric/special_functions.py
cosine_integral(x: float, terms: int = 200) -> float
¶
Computes the cosine integral Ci(x) = γ + ln(x) + ∫₀ˣ (cos(t)-1)/t dt.
Uses the series: Ci(x) = γ + ln(x) + Σ (-1)^k x^(2k) / ((2k)(2k)!).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
x
|
float
|
Evaluation point (x > 0). |
required |
terms
|
int
|
Number of series terms (default 200). |
200
|
Returns:
| Type | Description |
|---|---|
float
|
Value of Ci(x). |
Raises:
| Type | Description |
|---|---|
ValueError
|
If x <= 0. |
Example
round(cosine_integral(1.0), 6) 0.337404
Complexity: O(terms)
Source code in shortfx/fxNumeric/special_functions.py
dawson_function(x: float, terms: int = 100) -> float
¶
Computes Dawson's function D(x) = e^(-x^2) ∫₀ˣ e^(t^2) dt.
Uses the series: D(x) = x - 2x^3/3 + 4x^5/15 - ...
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
x
|
float
|
Evaluation point. |
required |
terms
|
int
|
Number of series terms (default 100). |
100
|
Returns:
| Type | Description |
|---|---|
float
|
Value of D(x). |
Example
round(dawson_function(1.0), 6) 0.538080
Complexity: O(terms)
Source code in shortfx/fxNumeric/special_functions.py
debye_function(n: int, x: float, terms: int = 200) -> float
¶
Compute the Debye function D_n(x) = (n/x^n) ∫₀ˣ t^n/(e^t - 1) dt.
Uses numerical trapezoidal integration.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
n
|
int
|
Order (positive integer). |
required |
x
|
float
|
Upper limit (positive real). |
required |
terms
|
int
|
Number of integration steps (default 200). |
200
|
Returns:
| Type | Description |
|---|---|
float
|
D_n(x). |
Raises:
| Type | Description |
|---|---|
TypeError
|
If n is not int or x is not numeric. |
ValueError
|
If n < 1 or x ≤ 0. |
Usage Example
round(debye_function(3, 1.0), 4) 0.6788
Complexity: O(terms)
Source code in shortfx/fxNumeric/special_functions.py
dedekind_eta(tau_im: float, terms: int = 100) -> float
¶
Computes the Dedekind eta function η(τ) for purely imaginary τ = i·τ_im.
η(τ) = exp(πiτ/12) Π_{n=1}^{∞} (1 - exp(2πinτ)).
For pure imaginary τ with positive imaginary part, the result is real.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
tau_im
|
float
|
Imaginary part of τ (> 0). |
required |
terms
|
int
|
Number of product terms. |
100
|
Returns:
| Type | Description |
|---|---|
float
|
η(i·tau_im). |
Raises:
| Type | Description |
|---|---|
ValueError
|
If tau_im <= 0. |
Example
round(dedekind_eta(1), 6) 0.768225
Complexity: O(terms)
Source code in shortfx/fxNumeric/special_functions.py
digamma(x: float) -> float
¶
Computes the digamma (psi) function: derivative of ln(Gamma(x)).
Uses the asymptotic expansion with recurrence for small x.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
x
|
float
|
Real positive argument. |
required |
Returns:
| Type | Description |
|---|---|
float
|
psi(x). |
Raises:
| Type | Description |
|---|---|
TypeError
|
If x is not numeric. |
ValueError
|
If x <= 0. |
Example
round(digamma(1), 6) -0.577216
Complexity: O(1)
Source code in shortfx/fxNumeric/special_functions.py
dilogarithm(z: float) -> float
¶
Computes the dilogarithm (Spence's function) Li_2(z) for z <= 1.
Li_2(z) = -∫₀ᶻ ln(1-t)/t dt = Σ z^k / k^2.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
z
|
float
|
Argument (z <= 1). |
required |
Returns:
| Type | Description |
|---|---|
float
|
Value of Li_2(z). |
Example
round(dilogarithm(1.0), 6) # pi^2/6 1.644934
Complexity: O(terms)
Source code in shortfx/fxNumeric/special_functions.py
dirichlet_integral() -> float
¶
Returns the exact value of the Dirichlet integral: integral_{0}^{inf} sin(x)/x dx = pi/2.
Returns:
| Type | Description |
|---|---|
float
|
pi/2. |
Example
round(dirichlet_integral(), 6) 1.570796
Complexity: O(1)
Source code in shortfx/fxNumeric/special_functions.py
double_factorial(n: int) -> int
¶
Compute the double factorial n!! = n × (n-2) × (n-4) × ··· × (1 or 2).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
n
|
int
|
Non-negative integer. |
required |
Returns:
| Type | Description |
|---|---|
int
|
n!! |
Raises:
| Type | Description |
|---|---|
TypeError
|
If n is not an integer. |
ValueError
|
If n < 0. |
Usage Example
double_factorial(7) 105
Complexity: O(n)
Source code in shortfx/fxNumeric/special_functions.py
elliptic_e(k: float) -> float
¶
Computes the complete elliptic integral of the second kind E(k).
Uses the AGM method with the auxiliary series.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
k
|
float
|
Modulus in [0, 1]. |
required |
Returns:
| Type | Description |
|---|---|
float
|
Value of E(k). |
Raises:
| Type | Description |
|---|---|
TypeError
|
If k is not numeric. |
ValueError
|
If k is not in [0, 1]. |
Example
round(elliptic_e(0.0), 10) 1.5707963268 round(elliptic_e(0.5), 6) 1.350644
Complexity: O(log(1/epsilon))
Source code in shortfx/fxNumeric/special_functions.py
elliptic_e_incomplete(phi: float, k: float) -> float
¶
Computes the incomplete elliptic integral of the second kind E(phi, k).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
phi
|
float
|
Amplitude angle in radians [0, pi/2]. |
required |
k
|
float
|
Modulus in [0, 1]. |
required |
Returns:
| Type | Description |
|---|---|
float
|
Value of E(phi, k). |
Raises:
| Type | Description |
|---|---|
TypeError
|
If phi or k are not numeric. |
ValueError
|
If phi not in [0, pi/2] or k not in [0, 1]. |
Example
round(elliptic_e_incomplete(math.pi / 2, 0.5), 6) 1.350644
Complexity: O(n) for n quadrature points.
Source code in shortfx/fxNumeric/special_functions.py
elliptic_f(phi: float, k: float) -> float
¶
Computes the incomplete elliptic integral of the first kind F(phi, k).
Uses numerical integration (Gauss-Legendre quadrature).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
phi
|
float
|
Amplitude angle in radians [0, pi/2]. |
required |
k
|
float
|
Modulus in [0, 1). |
required |
Returns:
| Type | Description |
|---|---|
float
|
Value of F(phi, k). |
Raises:
| Type | Description |
|---|---|
TypeError
|
If phi or k are not numeric. |
ValueError
|
If phi not in [0, pi/2] or k not in [0, 1). |
Example
round(elliptic_f(math.pi / 2, 0.5), 6) 1.854075
Complexity: O(n) for n quadrature points.
Source code in shortfx/fxNumeric/special_functions.py
elliptic_k(k: float) -> float
¶
Computes the complete elliptic integral of the first kind K(k).
Uses the arithmetic-geometric mean (AGM) method.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
k
|
float
|
Modulus in [0, 1). |
required |
Returns:
| Type | Description |
|---|---|
float
|
Value of K(k). |
Raises:
| Type | Description |
|---|---|
TypeError
|
If k is not numeric. |
ValueError
|
If k is not in [0, 1). |
Example
round(elliptic_k(0.0), 10) 1.5707963268 round(elliptic_k(0.5), 6) 1.854075
Complexity: O(log(1/epsilon)) — converges quadratically.
Source code in shortfx/fxNumeric/special_functions.py
elliptic_pi(n_param: float, k: float) -> float
¶
Computes the complete elliptic integral of the third kind Pi(n, k).
Uses numerical quadrature.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
n_param
|
float
|
Characteristic parameter (n < 1). |
required |
k
|
float
|
Modulus in [0, 1). |
required |
Returns:
| Type | Description |
|---|---|
float
|
Value of Pi(n, k). |
Raises:
| Type | Description |
|---|---|
TypeError
|
If n_param or k are not numeric. |
ValueError
|
If n_param >= 1 or k not in [0, 1). |
Example
round(elliptic_pi(0.5, 0.3), 4) 2.8015
Complexity: O(n) quadrature points.
Source code in shortfx/fxNumeric/special_functions.py
error_function(x: float) -> float
¶
Compute the error function erf(x) via Maclaurin series.
erf(x) = (2/√π) Σ_{n=0}^{∞} (-1)^n x^{2n+1} / (n! (2n+1))
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
x
|
float
|
Input value. |
required |
Returns:
| Type | Description |
|---|---|
float
|
erf(x) in [-1, 1]. |
Raises:
| Type | Description |
|---|---|
TypeError
|
If x is not numeric. |
Usage Example
round(error_function(1.0), 4) 0.8427
Complexity: O(N) where N ≈ 50 terms
Source code in shortfx/fxNumeric/special_functions.py
euler_number(n: int) -> int
¶
Computes the n-th Euler number E_n.
Euler numbers E_n are defined by the generating function 1/cosh(t) = sum_{n>=0} E_n t^n / n!. Odd Euler numbers are zero.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
n
|
int
|
Index (>= 0). |
required |
Returns:
| Type | Description |
|---|---|
int
|
The n-th Euler number. |
Raises:
| Type | Description |
|---|---|
TypeError
|
If n is not an integer. |
ValueError
|
If n < 0. |
Example
euler_number(0) 1 euler_number(2) -1 euler_number(4) 5
Complexity: O(n^2)
Source code in shortfx/fxNumeric/special_functions.py
euler_polynomial(n: int, x: float) -> float
¶
Evaluates the n-th Euler polynomial E_n(x).
E_n(x) = sum_{k=0}^{n} C(n,k) (E_k / 2^k) (x - 1/2)^{n-k}.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
n
|
int
|
Degree (>= 0). |
required |
x
|
float
|
Evaluation point. |
required |
Returns:
| Type | Description |
|---|---|
float
|
Value of E_n(x). |
Raises:
| Type | Description |
|---|---|
TypeError
|
If n is not an integer or x is not numeric. |
ValueError
|
If n < 0. |
Example
euler_polynomial(0, 1.0) 1.0 euler_polynomial(1, 0.5) 0.0
Complexity: O(n^2)
Source code in shortfx/fxNumeric/special_functions.py
euler_reflection_formula(z: float) -> float
¶
Verifies Euler's reflection formula: Γ(z)Γ(1-z) = π/sin(πz).
Returns Γ(z) computed via the reflection formula (useful when z < 0.5).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
z
|
float
|
Argument (z not an integer). |
required |
Returns:
| Type | Description |
|---|---|
float
|
Γ(z) computed via π / (sin(πz) · Γ(1-z)). |
Raises:
| Type | Description |
|---|---|
ValueError
|
If z is a non-positive integer. |
Example
round(euler_reflection_formula(0.5), 6) 1.772454
Complexity: O(1)
Source code in shortfx/fxNumeric/special_functions.py
exponential_integral_ei(x: float, terms: int = 200) -> float
¶
Computes the exponential integral Ei(x) for x > 0.
Ei(x) = γ + ln(x) + Σ x^k / (k * k!) for k = 1, 2, ...
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
x
|
float
|
Evaluation point (x > 0). |
required |
terms
|
int
|
Number of series terms (default 200). |
200
|
Returns:
| Type | Description |
|---|---|
float
|
Value of Ei(x). |
Raises:
| Type | Description |
|---|---|
TypeError
|
If x is not numeric. |
ValueError
|
If x <= 0. |
Example
round(exponential_integral_ei(1.0), 4) 1.8951
Complexity: O(terms)
Source code in shortfx/fxNumeric/special_functions.py
falling_factorial(x: float, n: int) -> float
¶
Computes the falling factorial x_(n) = x(x-1)(x-2)...(x-n+1).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
x
|
float
|
Base value. |
required |
n
|
int
|
Number of factors (>= 0). |
required |
Returns:
| Type | Description |
|---|---|
float
|
Value of x_(n). |
Example
falling_factorial(5, 3) # 543 60.0 falling_factorial(5, 5) # 5! 120.0
Complexity: O(n)
Source code in shortfx/fxNumeric/special_functions.py
fibonacci_polynomial(n: int, x: float) -> float
¶
Compute the n-th Fibonacci polynomial F_n(x).
F_0(x) = 0, F_1(x) = 1, F_n(x) = x·F_{n-1}(x) + F_{n-2}(x).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
n
|
int
|
Non-negative integer. |
required |
x
|
float
|
Variable. |
required |
Returns:
| Type | Description |
|---|---|
float
|
F_n(x). |
Raises:
| Type | Description |
|---|---|
TypeError
|
If n is not int or x is not numeric. |
ValueError
|
If n < 0. |
Usage Example
fibonacci_polynomial(5, 1.0) 5.0
Complexity: O(n)
Source code in shortfx/fxNumeric/special_functions.py
fresnel_c(x: float, terms: int = 100) -> float
¶
Computes the Fresnel cosine integral C(x) = ∫₀ˣ cos(π t²/2) dt.
Uses the Taylor series expansion.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
x
|
float
|
Evaluation point. |
required |
terms
|
int
|
Number of series terms (default 100). |
100
|
Returns:
| Type | Description |
|---|---|
float
|
Value of C(x). |
Example
round(fresnel_c(1.0), 6) 0.779893
Complexity: O(terms)
Source code in shortfx/fxNumeric/special_functions.py
fresnel_s(x: float, terms: int = 100) -> float
¶
Computes the Fresnel sine integral S(x) = ∫₀ˣ sin(π t²/2) dt.
Uses the Taylor series expansion.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
x
|
float
|
Evaluation point. |
required |
terms
|
int
|
Number of series terms (default 100). |
100
|
Returns:
| Type | Description |
|---|---|
float
|
Value of S(x). |
Example
round(fresnel_s(1.0), 6) 0.438259
Complexity: O(terms)
Source code in shortfx/fxNumeric/special_functions.py
gamma_duplication_formula(z: float) -> float
¶
Legendre's duplication formula: Γ(z)Γ(z+1/2) = √π · Γ(2z) / 2^(2z-1).
Returns Γ(z+1/2) computed from this identity.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
z
|
float
|
Argument (z > 0). |
required |
Returns:
| Type | Description |
|---|---|
float
|
Γ(z+1/2) via the duplication formula. |
Raises:
| Type | Description |
|---|---|
ValueError
|
If z <= 0. |
Example
round(gamma_duplication_formula(1.0), 6) 0.886227
Complexity: O(1)
Source code in shortfx/fxNumeric/special_functions.py
gaussian_integral() -> float
¶
Returns the exact value of the Gaussian integral: integral_{-inf}^{inf} e^{-x^2} dx = sqrt(pi).
Returns:
| Type | Description |
|---|---|
float
|
sqrt(pi). |
Example
round(gaussian_integral(), 6) 1.772454
Complexity: O(1)
Source code in shortfx/fxNumeric/special_functions.py
gegenbauer_polynomial(n: int, alpha: float, x: float) -> float
¶
Gegenbauer (ultraspherical) polynomial C_n^α(x) via recurrence.
C_0^α(x) = 1, C_1^α(x) = 2αx, k·C_k^α(x) = 2(k+α-1)x·C_{k-1}^α(x) - (k+2α-2)·C_{k-2}^α(x).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
n
|
int
|
Degree (non-negative integer). |
required |
alpha
|
float
|
Parameter α > -1/2, α ≠ 0. |
required |
x
|
float
|
Evaluation point. |
required |
Returns:
| Type | Description |
|---|---|
float
|
Value of C_n^α(x). |
Example
round(gegenbauer_polynomial(2, 1.0, 0.5), 6) -0.5
Complexity: O(n)
Source code in shortfx/fxNumeric/special_functions.py
generalized_harmonic_number(n: int, m: float = 1.0) -> float
¶
Compute the generalized harmonic number H(n, m) = Σ_{k=1}^{n} 1/k^m.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
n
|
int
|
Positive integer (upper limit). |
required |
m
|
float
|
Exponent (default 1.0 gives ordinary harmonic number). |
1.0
|
Returns:
| Type | Description |
|---|---|
float
|
The generalized harmonic number. |
Raises:
| Type | Description |
|---|---|
TypeError
|
If n is not an integer or m is not numeric. |
ValueError
|
If n < 1. |
Usage Example
round(generalized_harmonic_number(10, 2), 4) 1.5498
Complexity: O(n)
Source code in shortfx/fxNumeric/special_functions.py
generalized_laguerre_polynomial(n: int, alpha: float, x: float) -> float
¶
Evaluates the generalized (associated) Laguerre polynomial L_n^alpha(x).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
n
|
int
|
Degree (>= 0). |
required |
alpha
|
float
|
Parameter (> -1). |
required |
x
|
float
|
Evaluation point. |
required |
Returns:
| Type | Description |
|---|---|
float
|
Value of L_n^alpha(x). |
Raises:
| Type | Description |
|---|---|
TypeError
|
If n is not an integer or x/alpha is not numeric. |
ValueError
|
If n < 0 or alpha <= -1. |
Example
generalized_laguerre_polynomial(2, 0, 1.0) 0.5
Complexity: O(n)
Source code in shortfx/fxNumeric/special_functions.py
gudermannian(x: float) -> float
¶
Compute the Gudermannian function gd(x) = 2·arctan(tanh(x/2)).
Relates circular and hyperbolic functions without complex numbers.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
x
|
float
|
Input value. |
required |
Returns:
| Type | Description |
|---|---|
float
|
gd(x) in (-π/2, π/2). |
Raises:
| Type | Description |
|---|---|
TypeError
|
If x is not numeric. |
Usage Example
round(gudermannian(1.0), 4) 0.8658
Complexity: O(1)
Source code in shortfx/fxNumeric/special_functions.py
harmonic_number(n: int) -> float
¶
Compute the n-th harmonic number H_n = Σ_{k=1}^{n} 1/k.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
n
|
int
|
Positive integer. |
required |
Returns:
| Type | Description |
|---|---|
float
|
The n-th harmonic number. |
Raises:
| Type | Description |
|---|---|
TypeError
|
If n is not an integer. |
ValueError
|
If n < 1. |
Usage Example
round(harmonic_number(10), 4) 2.9290
Complexity: O(n)
Source code in shortfx/fxNumeric/special_functions.py
heaviside_step(x: float) -> float
¶
Compute the Heaviside step function H(x).
H(x) = 0 for x < 0, 0.5 for x = 0, 1 for x > 0.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
x
|
float
|
Input value. |
required |
Returns:
| Type | Description |
|---|---|
float
|
0.0, 0.5, or 1.0. |
Raises:
| Type | Description |
|---|---|
TypeError
|
If x is not numeric. |
Usage Example
heaviside_step(5) 1.0
Complexity: O(1)
Source code in shortfx/fxNumeric/special_functions.py
hermite_polynomial(n: int, x: float) -> float
¶
Evaluates the (physicist's) Hermite polynomial H_n(x).
Uses the recurrence H_{n+1}(x) = 2x H_n(x) - 2n H_{n-1}(x).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
n
|
int
|
Degree (>= 0). |
required |
x
|
float
|
Evaluation point. |
required |
Returns:
| Type | Description |
|---|---|
float
|
Value of H_n(x). |
Raises:
| Type | Description |
|---|---|
TypeError
|
If n is not an integer or x is not numeric. |
ValueError
|
If n < 0. |
Example
hermite_polynomial(0, 1.0) 1.0 hermite_polynomial(3, 2.0) 40.0
Complexity: O(n)
Source code in shortfx/fxNumeric/special_functions.py
hexagonal_number(n: int) -> int
¶
Compute the n-th hexagonal number H_n = n(2n - 1).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
n
|
int
|
Non-negative integer. |
required |
Returns:
| Type | Description |
|---|---|
int
|
The n-th hexagonal number. |
Raises:
| Type | Description |
|---|---|
TypeError
|
If n is not an integer. |
ValueError
|
If n < 0. |
Usage Example
hexagonal_number(5) 45
Complexity: O(1)
Source code in shortfx/fxNumeric/special_functions.py
hurwitz_zeta(s: float, a: float, terms: int = 100000) -> float
¶
Computes the Hurwitz zeta function ζ(s, a) = Σ 1/(n+a)^s for n=0,1,2,...
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
s
|
float
|
Exponent (s > 1 for convergence). |
required |
a
|
float
|
Shift parameter (a > 0). |
required |
terms
|
int
|
Number of series terms (default 100000). |
100000
|
Returns:
| Type | Description |
|---|---|
float
|
Value of ζ(s, a). |
Raises:
| Type | Description |
|---|---|
ValueError
|
If s <= 1 or a <= 0. |
Example
round(hurwitz_zeta(2, 1), 4) # ζ(2,1) = π²/6 1.6449
Complexity: O(terms)
Source code in shortfx/fxNumeric/special_functions.py
hypergeometric_1f1(a: float, b: float, z: float) -> float
¶
Computes the confluent hypergeometric function 1F1(a; b; z) (Kummer's M).
M(a, b, z) = sum_{n=0}^{inf} (a)_n z^n / ((b)_n n!).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
a
|
float
|
Numerator parameter. |
required |
b
|
float
|
Denominator parameter (must not be 0 or a negative integer). |
required |
z
|
float
|
Argument. |
required |
Returns:
| Type | Description |
|---|---|
float
|
Value of M(a, b, z). |
Raises:
| Type | Description |
|---|---|
TypeError
|
If parameters are not numeric. |
ValueError
|
If b is 0 or a negative integer. |
Example
round(hypergeometric_1f1(1, 1, 1), 6) 2.718282
Complexity: O(max_terms)
Source code in shortfx/fxNumeric/special_functions.py
hypergeometric_2f1(a: float, b: float, c: float, z: float) -> float
¶
Computes the Gauss hypergeometric function 2F1(a, b; c; z).
Uses the series expansion sum_{n=0}^{inf} (a)_n (b)_n / ((c)_n n!) z^n.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
a
|
float
|
First numerator parameter. |
required |
b
|
float
|
Second numerator parameter. |
required |
c
|
float
|
Denominator parameter (must not be 0 or a negative integer). |
required |
z
|
float
|
Argument (|z| < 1 for convergence). |
required |
Returns:
| Type | Description |
|---|---|
float
|
Value of 2F1(a, b; c; z). |
Raises:
| Type | Description |
|---|---|
TypeError
|
If parameters are not numeric. |
ValueError
|
If c is 0 or a negative integer, or |z| >= 1. |
Example
round(hypergeometric_2f1(1, 1, 2, 0.5), 6) 1.386294
Complexity: O(max_terms)
Source code in shortfx/fxNumeric/special_functions.py
incomplete_beta_regularized(a: float, b: float, x: float) -> float
¶
Computes the regularized incomplete beta function I_x(a, b).
Uses the continued-fraction representation for numerical stability.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
a
|
float
|
First parameter (> 0). |
required |
b
|
float
|
Second parameter (> 0). |
required |
x
|
float
|
Evaluation point in [0, 1]. |
required |
Returns:
| Type | Description |
|---|---|
float
|
I_x(a, b) in [0, 1]. |
Raises:
| Type | Description |
|---|---|
TypeError
|
If a, b, or x are not numeric. |
ValueError
|
If a <= 0, b <= 0, or x not in [0, 1]. |
Example
round(incomplete_beta_regularized(2, 3, 0.5), 6) 0.6875
Complexity: O(max_iterations) with continued fraction convergence.
Source code in shortfx/fxNumeric/special_functions.py
649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 | |
incomplete_gamma_lower(a: float, x: float) -> float
¶
Computes the regularized lower incomplete gamma function P(a, x).
Uses the series expansion for convergence.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
a
|
float
|
Shape parameter (> 0). |
required |
x
|
float
|
Upper limit of integration (>= 0). |
required |
Returns:
| Type | Description |
|---|---|
float
|
Regularized lower incomplete gamma P(a, x) in [0, 1]. |
Raises:
| Type | Description |
|---|---|
TypeError
|
If a or x are not numeric. |
ValueError
|
If a <= 0 or x < 0. |
Example
round(incomplete_gamma_lower(1.0, 1.0), 6) 0.632121
Complexity: O(a + x) iterations typically.
Source code in shortfx/fxNumeric/special_functions.py
inverse_error_function(p: float) -> float
¶
Compute the inverse error function erfinv(p) via Newton-Raphson.
Finds x such that erf(x) = p.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
p
|
float
|
Value in (-1, 1). |
required |
Returns:
| Type | Description |
|---|---|
float
|
x such that erf(x) ≈ p. |
Raises:
| Type | Description |
|---|---|
TypeError
|
If p is not numeric. |
ValueError
|
If p is not in (-1, 1). |
Usage Example
round(inverse_error_function(0.8427), 2) 1.0
Complexity: O(N) Newton iterations × O(M) series terms
Source code in shortfx/fxNumeric/special_functions.py
inverse_gudermannian(x: float) -> float
¶
Compute the inverse Gudermannian gd⁻¹(x) = ln(tan(π/4 + x/2)).
Also known as the Mercator function or isometric latitude.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
x
|
float
|
Input value in (-π/2, π/2). |
required |
Returns:
| Type | Description |
|---|---|
float
|
gd⁻¹(x). |
Raises:
| Type | Description |
|---|---|
TypeError
|
If x is not numeric. |
ValueError
|
If |x| ≥ π/2. |
Usage Example
round(inverse_gudermannian(0.8658), 4) 1.0
Complexity: O(1)
Source code in shortfx/fxNumeric/special_functions.py
jacobi_polynomial(n: int, alpha: float, beta: float, x: float) -> float
¶
Jacobi polynomial P_n^(α,β)(x) via recurrence.
P_0 = 1, P_1 = (α-β)/2 + (α+β+2)x/2.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
n
|
int
|
Degree (non-negative integer). |
required |
alpha
|
float
|
Parameter α > -1. |
required |
beta
|
float
|
Parameter β > -1. |
required |
x
|
float
|
Evaluation point in [-1, 1]. |
required |
Returns:
| Type | Description |
|---|---|
float
|
Value of P_n^(α,β)(x). |
Example
round(jacobi_polynomial(2, 0, 0, 0.5), 6) -0.125
Complexity: O(n)
Source code in shortfx/fxNumeric/special_functions.py
jacobi_theta_1(z: float, q: float, terms: int = 50) -> float
¶
Computes the Jacobi theta function θ₁(z, q).
θ₁(z, q) = 2 Σ_{n=0}^{terms} (-1)^n q^((n+1/2)²) sin((2n+1)z).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
z
|
float
|
Argument (real). |
required |
q
|
float
|
Nome parameter (|q| < 1). |
required |
terms
|
int
|
Number of series terms. |
50
|
Returns:
| Type | Description |
|---|---|
float
|
θ₁(z, q). |
Raises:
| Type | Description |
|---|---|
TypeError
|
If z or q are not numeric. |
ValueError
|
If |q| >= 1. |
Example
round(jacobi_theta_1(0.5, 0.1), 6) 0.091557
Complexity: O(terms)
Source code in shortfx/fxNumeric/special_functions.py
jacobi_theta_2(z: float, q: float, terms: int = 50) -> float
¶
Computes the Jacobi theta function θ₂(z, q).
θ₂(z, q) = 2 Σ_{n=0}^{terms} q^((n+1/2)²) cos((2n+1)z).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
z
|
float
|
Argument (real). |
required |
q
|
float
|
Nome parameter (|q| < 1). |
required |
terms
|
int
|
Number of series terms. |
50
|
Returns:
| Type | Description |
|---|---|
float
|
θ₂(z, q). |
Example
round(jacobi_theta_2(0, 0.1), 6) 0.200010
Complexity: O(terms)
Source code in shortfx/fxNumeric/special_functions.py
jacobi_theta_3(z: float, q: float, terms: int = 50) -> float
¶
Computes the Jacobi theta function θ₃(z, q).
θ₃(z, q) = 1 + 2 Σ_{n=1}^{terms} q^(n²) cos(2nz).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
z
|
float
|
Argument (real). |
required |
q
|
float
|
Nome parameter (|q| < 1). |
required |
terms
|
int
|
Number of series terms. |
50
|
Returns:
| Type | Description |
|---|---|
float
|
θ₃(z, q). |
Raises:
| Type | Description |
|---|---|
TypeError
|
If z or q are not numeric. |
ValueError
|
If |q| >= 1. |
Example
round(jacobi_theta_3(0, 0.1), 6) 1.200020
Complexity: O(terms)
Source code in shortfx/fxNumeric/special_functions.py
jacobi_theta_4(z: float, q: float, terms: int = 50) -> float
¶
Computes the Jacobi theta function θ₄(z, q).
θ₄(z, q) = 1 + 2 Σ_{n=1}^{terms} (-1)^n q^(n²) cos(2nz).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
z
|
float
|
Argument (real). |
required |
q
|
float
|
Nome parameter (|q| < 1). |
required |
terms
|
int
|
Number of series terms. |
50
|
Returns:
| Type | Description |
|---|---|
float
|
θ₄(z, q). |
Example
round(jacobi_theta_4(0, 0.1), 6) 0.799980
Complexity: O(terms)
Source code in shortfx/fxNumeric/special_functions.py
kelvin_bei(x: float, terms: int = 50) -> float
¶
Kelvin function bei(x) = Im[J_0(x√i)].
bei(x) = Σ_{k=0}^∞ sin(kπ/2) · (x/2)^{2k} / (k!)^2.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
x
|
float
|
Argument. |
required |
terms
|
int
|
Series terms (default 50). |
50
|
Returns:
| Type | Description |
|---|---|
float
|
Value of bei(x). |
Example
round(kelvin_bei(1.0), 6) 0.249937
Complexity: O(terms)
Source code in shortfx/fxNumeric/special_functions.py
kelvin_ber(x: float, terms: int = 50) -> float
¶
Kelvin function ber(x) = Re[J_0(x√i)].
ber(x) = Σ_{k=0}^∞ cos(kπ/2) · (x/2)^{2k} / (k!)^2.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
x
|
float
|
Argument. |
required |
terms
|
int
|
Series terms (default 50). |
50
|
Returns:
| Type | Description |
|---|---|
float
|
Value of ber(x). |
Example
round(kelvin_ber(1.0), 6) 0.98438
Complexity: O(terms)
Source code in shortfx/fxNumeric/special_functions.py
laguerre_polynomial(n: int, x: float) -> float
¶
Evaluates the Laguerre polynomial L_n(x).
Uses the recurrence L_{n+1}(x) = ((2n+1-x) L_n(x) - n L_{n-1}(x))/(n+1).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
n
|
int
|
Degree (>= 0). |
required |
x
|
float
|
Evaluation point (>= 0 for standard applications). |
required |
Returns:
| Type | Description |
|---|---|
float
|
Value of L_n(x). |
Raises:
| Type | Description |
|---|---|
TypeError
|
If n is not an integer or x is not numeric. |
ValueError
|
If n < 0. |
Example
laguerre_polynomial(0, 1.0) 1.0 laguerre_polynomial(2, 1.0) 0.5
Complexity: O(n)
Source code in shortfx/fxNumeric/special_functions.py
lambert_w(x: float, tol: float = 1e-12) -> float
¶
Compute the principal branch W₀ of the Lambert W function.
W(x) satisfies W(x)·e^{W(x)} = x for x ≥ -1/e.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
x
|
float
|
Input value ≥ -1/e. |
required |
tol
|
float
|
Convergence tolerance (default 1e-12). |
1e-12
|
Returns:
| Type | Description |
|---|---|
float
|
W₀(x). |
Raises:
| Type | Description |
|---|---|
TypeError
|
If x is not numeric. |
ValueError
|
If x < -1/e. |
Usage Example
round(lambert_w(1.0), 4) 0.5671
Complexity: O(N) Halley iterations
Source code in shortfx/fxNumeric/special_functions.py
lanczos_gamma(z: float) -> float
¶
Computes the Gamma function using the Lanczos approximation.
Complements math.gamma with higher precision for edge cases.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
z
|
float
|
Real argument (z > 0 or non-integer negative). |
required |
Returns:
| Type | Description |
|---|---|
float
|
Gamma(z). |
Raises:
| Type | Description |
|---|---|
TypeError
|
If z is not numeric. |
ValueError
|
If z is a non-positive integer. |
Example
round(lanczos_gamma(5.5), 6) 52.342778
Complexity: O(1)
Source code in shortfx/fxNumeric/special_functions.py
legendre_polynomial(n: int, x: float) -> float
¶
Evaluates the Legendre polynomial P_n(x) via Bonnet's recurrence.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
n
|
int
|
Degree of the polynomial (>= 0). |
required |
x
|
float
|
Evaluation point, typically in [-1, 1]. |
required |
Returns:
| Type | Description |
|---|---|
float
|
Value of P_n(x). |
Raises:
| Type | Description |
|---|---|
TypeError
|
If n is not an integer or x is not numeric. |
ValueError
|
If n < 0. |
Example
legendre_polynomial(0, 0.5) 1.0 legendre_polynomial(2, 0.5) -0.125
Complexity: O(n)
Source code in shortfx/fxNumeric/special_functions.py
log_gamma(x: float) -> float
¶
Compute the natural logarithm of the Gamma function ln(Γ(x)).
Uses Lanczos approximation with g=7.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
x
|
float
|
Positive real number. |
required |
Returns:
| Type | Description |
|---|---|
float
|
ln(Γ(x)). |
Raises:
| Type | Description |
|---|---|
TypeError
|
If x is not numeric. |
ValueError
|
If x ≤ 0. |
Usage Example
round(log_gamma(5.0), 4) 3.1781
Complexity: O(1)
Source code in shortfx/fxNumeric/special_functions.py
logistic_function(x: float, upper: float = 1.0, k: float = 1.0, x0: float = 0.0) -> float
¶
Compute the logistic (sigmoid) function f(x) = L / (1 + e^{-k(x - x₀)}).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
x
|
float
|
Input value. |
required |
upper
|
float
|
Maximum value (default 1.0). |
1.0
|
k
|
float
|
Steepness (default 1.0). |
1.0
|
x0
|
float
|
Midpoint (default 0.0). |
0.0
|
Returns:
| Type | Description |
|---|---|
float
|
Logistic function value. |
Raises:
| Type | Description |
|---|---|
TypeError
|
If any argument is not numeric. |
Usage Example
logistic_function(0) 0.5
Complexity: O(1)
Source code in shortfx/fxNumeric/special_functions.py
lucas_polynomial(n: int, x: float) -> float
¶
Compute the n-th Lucas polynomial L_n(x).
L_0(x) = 2, L_1(x) = x, L_n(x) = x·L_{n-1}(x) + L_{n-2}(x).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
n
|
int
|
Non-negative integer. |
required |
x
|
float
|
Variable. |
required |
Returns:
| Type | Description |
|---|---|
float
|
L_n(x). |
Raises:
| Type | Description |
|---|---|
TypeError
|
If n is not int or x is not numeric. |
ValueError
|
If n < 0. |
Usage Example
lucas_polynomial(5, 1.0) 11.0
Complexity: O(n)
Source code in shortfx/fxNumeric/special_functions.py
mittag_leffler(alpha: float, beta: float, z: float, terms: int = 100) -> float
¶
Mittag-Leffler function E_{α,β}(z) = Σ_{k=0}^∞ z^k / Γ(αk+β).
Generalizes the exponential function. E_{1,1}(z) = e^z.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
alpha
|
float
|
Parameter α > 0. |
required |
beta
|
float
|
Parameter β > 0. |
required |
z
|
float
|
Argument. |
required |
terms
|
int
|
Series terms (default 100). |
100
|
Returns:
| Type | Description |
|---|---|
float
|
Value of E_{α,β}(z). |
Example
round(mittag_leffler(1.0, 1.0, 1.0), 6) 2.718282
Complexity: O(terms)
Source code in shortfx/fxNumeric/special_functions.py
modified_bessel_i(n: int, x: float, terms: int = 80) -> float
¶
Computes the modified Bessel function of the first kind I_n(x).
I_n(x) = Σ (x/2)^(2k+n) / (k! * (k+n)!)
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
n
|
int
|
Order (>= 0). |
required |
x
|
float
|
Evaluation point. |
required |
terms
|
int
|
Number of series terms (default 80). |
80
|
Returns:
| Type | Description |
|---|---|
float
|
Value of I_n(x). |
Raises:
| Type | Description |
|---|---|
TypeError
|
If n is not an integer or x is not numeric. |
ValueError
|
If n < 0. |
Example
round(modified_bessel_i(0, 0), 6) 1.0
Complexity: O(terms)
Source code in shortfx/fxNumeric/special_functions.py
modified_bessel_k(n: int, x: float) -> float
¶
Computes the modified Bessel function of the second kind K_n(x).
Uses K_n(x) = (π/2) * (I_{-n}(x) - I_n(x)) / sin(nπ) via limiting form. For integer n, uses numerical differentiation w.r.t. order.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
n
|
int
|
Order (>= 0). |
required |
x
|
float
|
Evaluation point (x > 0). |
required |
Returns:
| Type | Description |
|---|---|
float
|
Value of K_n(x). |
Raises:
| Type | Description |
|---|---|
TypeError
|
If n is not an integer or x is not numeric. |
ValueError
|
If n < 0 or x <= 0. |
Example
round(modified_bessel_k(0, 1.0), 4) 0.4210
Complexity: O(terms)
Source code in shortfx/fxNumeric/special_functions.py
multinomial_coefficient(n: int, *groups: int) -> int
¶
Computes the multinomial coefficient n! / (k1! * k2! * ... * km!).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
n
|
int
|
Total number of items. |
required |
*groups
|
int
|
Sizes of each group (must sum to n). |
()
|
Returns:
| Type | Description |
|---|---|
int
|
Multinomial coefficient. |
Raises:
| Type | Description |
|---|---|
ValueError
|
If groups don't sum to n. |
Example
multinomial_coefficient(6, 2, 2, 2) 90 multinomial_coefficient(4, 2, 1, 1) 12
Complexity: O(n)
Source code in shortfx/fxNumeric/special_functions.py
normalized_sinc(x: float) -> float
¶
Compute the normalized sinc function sinc(x) = sin(πx)/(πx).
Returns 1.0 when x = 0 (the limit).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
x
|
float
|
Input value. |
required |
Returns:
| Type | Description |
|---|---|
float
|
sin(πx)/(πx). |
Raises:
| Type | Description |
|---|---|
TypeError
|
If x is not numeric. |
Usage Example
normalized_sinc(0) 1.0
Complexity: O(1)
Source code in shortfx/fxNumeric/special_functions.py
partition_number(n: int) -> int
¶
Compute the partition number p(n) using dynamic programming.
p(n) counts the number of ways to write n as a sum of positive integers.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
n
|
int
|
Non-negative integer. |
required |
Returns:
| Type | Description |
|---|---|
int
|
The partition number p(n). |
Raises:
| Type | Description |
|---|---|
TypeError
|
If n is not an integer. |
ValueError
|
If n < 0. |
Usage Example
partition_number(10) 42
Complexity: O(n²)
Source code in shortfx/fxNumeric/special_functions.py
pentagonal_number(n: int) -> int
¶
Compute the n-th pentagonal number P_n = n(3n - 1)/2.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
n
|
int
|
Non-negative integer. |
required |
Returns:
| Type | Description |
|---|---|
int
|
The n-th pentagonal number. |
Raises:
| Type | Description |
|---|---|
TypeError
|
If n is not an integer. |
ValueError
|
If n < 0. |
Usage Example
pentagonal_number(5) 35
Complexity: O(1)
Source code in shortfx/fxNumeric/special_functions.py
polygamma(m: int, x: float) -> float
¶
Computes the polygamma function ψ^(m)(x) numerically.
For m=0 returns digamma, m=1 returns trigamma, etc. Uses finite differences of digamma for m >= 2.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
m
|
int
|
Order (non-negative integer). |
required |
x
|
float
|
Real positive argument. |
required |
Returns:
| Type | Description |
|---|---|
float
|
ψ^(m)(x). |
Raises:
| Type | Description |
|---|---|
TypeError
|
If m is not int or x not numeric. |
ValueError
|
If m < 0 or x <= 0. |
Example
round(polygamma(0, 1), 6) -0.577216
Complexity: O(m) finite differences.
Source code in shortfx/fxNumeric/special_functions.py
polylogarithm(s: float, z: float, terms: int = 500) -> float
¶
Computes the polylogarithm Li_s(z) = Σ z^k / k^s for |z| <= 1.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
s
|
float
|
Order of the polylogarithm. |
required |
z
|
float
|
Argument (|z| <= 1 for convergence). |
required |
terms
|
int
|
Number of series terms (default 500). |
500
|
Returns:
| Type | Description |
|---|---|
float
|
Value of Li_s(z). |
Raises:
| Type | Description |
|---|---|
ValueError
|
If |z| > 1. |
Example
round(polylogarithm(2, 0.5), 6) 0.582241
Complexity: O(terms)
Source code in shortfx/fxNumeric/special_functions.py
ramp_function(x: float) -> float
¶
Compute the ramp function R(x) = max(0, x).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
x
|
float
|
Input value. |
required |
Returns:
| Type | Description |
|---|---|
float
|
R(x). |
Raises:
| Type | Description |
|---|---|
TypeError
|
If x is not numeric. |
Usage Example
ramp_function(3.5) 3.5
Complexity: O(1)
Source code in shortfx/fxNumeric/special_functions.py
reciprocal_gamma(x: float) -> float
¶
Reciprocal gamma function 1/Γ(x).
Well-defined everywhere including non-positive integers where Γ has poles.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
x
|
float
|
Argument. |
required |
Returns:
| Type | Description |
|---|---|
float
|
1/Γ(x), or 0 at non-positive integers. |
Example
reciprocal_gamma(1.0) 1.0 reciprocal_gamma(0.0) 0.0
Complexity: O(1)
Source code in shortfx/fxNumeric/special_functions.py
rectangular_function(x: float) -> float
¶
Compute the rectangular (boxcar) function rect(x).
rect(x) = 1 for |x| < 0.5, 0.5 for |x| = 0.5, 0 otherwise.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
x
|
float
|
Input value. |
required |
Returns:
| Type | Description |
|---|---|
float
|
0.0, 0.5, or 1.0. |
Raises:
| Type | Description |
|---|---|
TypeError
|
If x is not numeric. |
Usage Example
rectangular_function(0.3) 1.0
Complexity: O(1)
Source code in shortfx/fxNumeric/special_functions.py
riemann_zeta(s: float) -> float
¶
Computes the Riemann zeta function zeta(s) for real s > 1.
Uses the Borwein algorithm (Dirichlet-series acceleration) for convergence.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
s
|
float
|
Real argument (> 1 for convergence of the standard series). |
required |
Returns:
| Type | Description |
|---|---|
float
|
Value of zeta(s). |
Raises:
| Type | Description |
|---|---|
TypeError
|
If s is not numeric. |
ValueError
|
If s <= 1. |
Example
round(riemann_zeta(2), 6) 1.644934
Complexity: O(n) where n is the number of Borwein terms.
Source code in shortfx/fxNumeric/special_functions.py
rising_factorial(x: float, n: int) -> float
¶
Computes the rising factorial (Pochhammer symbol) x^(n) = x(x+1)(x+2)...(x+n-1).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
x
|
float
|
Base value. |
required |
n
|
int
|
Number of factors (>= 0). |
required |
Returns:
| Type | Description |
|---|---|
float
|
Value of (x)_n. |
Example
rising_factorial(3, 4) # 345*6 360.0 rising_factorial(1, 5) # 5! 120.0
Complexity: O(n)
Source code in shortfx/fxNumeric/special_functions.py
sinc_function(x: float) -> float
¶
Compute the unnormalized sinc function sinc(x) = sin(x)/x.
Returns 1.0 when x = 0 (the limit).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
x
|
float
|
Input value. |
required |
Returns:
| Type | Description |
|---|---|
float
|
sinc(x). |
Raises:
| Type | Description |
|---|---|
TypeError
|
If x is not numeric. |
Usage Example
sinc_function(0) 1.0
Complexity: O(1)
Source code in shortfx/fxNumeric/special_functions.py
sine_integral(x: float, terms: int = 200) -> float
¶
Computes the sine integral Si(x) = ∫₀ˣ sin(t)/t dt.
Uses the Taylor series: Si(x) = Σ (-1)^k x^(2k+1) / ((2k+1)(2k+1)!).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
x
|
float
|
Evaluation point. |
required |
terms
|
int
|
Number of series terms (default 200). |
200
|
Returns:
| Type | Description |
|---|---|
float
|
Value of Si(x). |
Example
round(sine_integral(1.0), 6) 0.946083
Complexity: O(terms)
Source code in shortfx/fxNumeric/special_functions.py
softplus_function(x: float) -> float
¶
Compute the softplus function f(x) = ln(1 + e^x).
Smooth approximation of the ReLU function.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
x
|
float
|
Input value. |
required |
Returns:
| Type | Description |
|---|---|
float
|
softplus(x). |
Raises:
| Type | Description |
|---|---|
TypeError
|
If x is not numeric. |
Usage Example
round(softplus_function(0), 4) 0.6931
Complexity: O(1)
Source code in shortfx/fxNumeric/special_functions.py
spherical_bessel_j(n: int, x: float) -> float
¶
Computes the spherical Bessel function of the first kind j_n(x).
j_n(x) = sqrt(pi/(2x)) J_{n+1/2}(x).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
n
|
int
|
Order (>= 0). |
required |
x
|
float
|
Evaluation point. |
required |
Returns:
| Type | Description |
|---|---|
float
|
Value of j_n(x). |
Raises:
| Type | Description |
|---|---|
TypeError
|
If n is not an integer or x is not numeric. |
ValueError
|
If n < 0. |
Example
round(spherical_bessel_j(0, 1.0), 6) 0.841471
Complexity: O(n) via forward recurrence.
Source code in shortfx/fxNumeric/special_functions.py
spherical_bessel_y(n: int, x: float) -> float
¶
Computes the spherical Bessel function of the second kind y_n(x).
y_n(x) = sqrt(pi/(2x)) Y_{n+1/2}(x).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
n
|
int
|
Order (>= 0). |
required |
x
|
float
|
Evaluation point (> 0). |
required |
Returns:
| Type | Description |
|---|---|
float
|
Value of y_n(x). |
Raises:
| Type | Description |
|---|---|
TypeError
|
If n is not an integer or x is not numeric. |
ValueError
|
If n < 0 or x <= 0. |
Example
round(spherical_bessel_y(0, 1.0), 6) -0.540302
Complexity: O(n) via forward recurrence.
Source code in shortfx/fxNumeric/special_functions.py
spherical_harmonic_real(l: int, m: int, theta: float, phi: float) -> float
¶
Computes the real spherical harmonic Y_l^m(theta, phi).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
l
|
int
|
Degree (>= 0). |
required |
m
|
int
|
Order (-l <= m <= l). |
required |
theta
|
float
|
Polar angle in [0, pi]. |
required |
phi
|
float
|
Azimuthal angle in [0, 2*pi]. |
required |
Returns:
| Type | Description |
|---|---|
float
|
Real-valued spherical harmonic. |
Raises:
| Type | Description |
|---|---|
TypeError
|
If l or m are not integers or angles are not numeric. |
ValueError
|
If l < 0 or |m| > l. |
Example
round(spherical_harmonic_real(0, 0, 0, 0), 6) 0.282095
Complexity: O(l)
Source code in shortfx/fxNumeric/special_functions.py
stirling_approximation(n: int) -> float
¶
Computes Stirling's approximation for n!: sqrt(2πn) * (n/e)^n.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
n
|
int
|
Non-negative integer. |
required |
Returns:
| Type | Description |
|---|---|
float
|
Approximation of n!. |
Raises:
| Type | Description |
|---|---|
TypeError
|
If n is not an integer. |
ValueError
|
If n < 0. |
Example
round(stirling_approximation(10), 0) 3598695.0
Complexity: O(1)
Source code in shortfx/fxNumeric/special_functions.py
stirling_number_first(n: int, k: int) -> int
¶
Computes the unsigned Stirling number of the first kind |s(n, k)|.
Counts the number of permutations of n elements with exactly k cycles.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
n
|
int
|
Total elements (>= 0). |
required |
k
|
int
|
Number of cycles (>= 0). |
required |
Returns:
| Type | Description |
|---|---|
int
|
Unsigned Stirling number |s(n, k)|. |
Raises:
| Type | Description |
|---|---|
TypeError
|
If n or k are not non-negative integers. |
ValueError
|
If k > n. |
Example
stirling_number_first(4, 2) 11 stirling_number_first(3, 1) 2
Complexity: O(n * k)
Source code in shortfx/fxNumeric/special_functions.py
struve_h(nu: int, x: float, terms: int = 50) -> float
¶
Struve function H_ν(x) for integer ν ≥ 0.
H_ν(x) = Σ_{k=0}^∞ (-1)^k (x/2)^(2k+ν+1) / (Γ(k+3/2)Γ(k+ν+3/2)).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
nu
|
int
|
Order (non-negative integer). |
required |
x
|
float
|
Argument. |
required |
terms
|
int
|
Number of series terms (default 50). |
50
|
Returns:
| Type | Description |
|---|---|
float
|
Value of H_ν(x). |
Example
round(struve_h(0, 1.0), 6) 0.568657
Complexity: O(terms)
Source code in shortfx/fxNumeric/special_functions.py
subfactorial(n: int) -> int
¶
Computes the subfactorial !n (number of derangements of n elements).
!n = n! Σ (-1)^k / k! for k = 0 to n.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
n
|
int
|
Non-negative integer. |
required |
Returns:
| Type | Description |
|---|---|
int
|
Number of derangements. |
Example
subfactorial(0) 1 subfactorial(3) 2 subfactorial(5) 44
Complexity: O(n)
Source code in shortfx/fxNumeric/special_functions.py
touchard_polynomial(n: int, x: float) -> float
¶
Compute the n-th Touchard (exponential) polynomial T_n(x).
T_n(x) = Σ_{k=0}^{n} S(n,k) x^k where S(n,k) are Stirling numbers of the second kind.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
n
|
int
|
Non-negative integer. |
required |
x
|
float
|
Variable. |
required |
Returns:
| Type | Description |
|---|---|
float
|
T_n(x). |
Raises:
| Type | Description |
|---|---|
TypeError
|
If n is not int or x is not numeric. |
ValueError
|
If n < 0. |
Usage Example
touchard_polynomial(3, 1.0) 5.0
Complexity: O(n²)
Source code in shortfx/fxNumeric/special_functions.py
triangular_function(x: float) -> float
¶
Compute the triangular function tri(x) = max(0, 1 - |x|).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
x
|
float
|
Input value. |
required |
Returns:
| Type | Description |
|---|---|
float
|
tri(x) in [0, 1]. |
Raises:
| Type | Description |
|---|---|
TypeError
|
If x is not numeric. |
Usage Example
triangular_function(0.3) 0.7
Complexity: O(1)
Source code in shortfx/fxNumeric/special_functions.py
trigamma(x: float) -> float
¶
Computes the trigamma function ψ₁(x) = d²/dx² ln(Γ(x)).
Uses the recurrence ψ₁(x) = ψ₁(x+1) + 1/x² and asymptotic expansion.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
x
|
float
|
Real positive argument. |
required |
Returns:
| Type | Description |
|---|---|
float
|
ψ₁(x). |
Raises:
| Type | Description |
|---|---|
TypeError
|
If x is not numeric. |
ValueError
|
If x <= 0. |
Example
round(trigamma(1), 6) 1.644934
Complexity: O(1)
Source code in shortfx/fxNumeric/special_functions.py
upper_incomplete_gamma(a: float, x: float, terms: int = 200) -> float
¶
Computes the upper incomplete gamma function Γ(a, x) = ∫ₓ^∞ t^(a-1) e^(-t) dt.
Γ(a, x) = Γ(a) - γ(a, x) where γ is the lower incomplete gamma.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
a
|
float
|
Shape parameter (a > 0). |
required |
x
|
float
|
Lower limit (x >= 0). |
required |
terms
|
int
|
Number of series terms (default 200). |
200
|
Returns:
| Type | Description |
|---|---|
float
|
Value of Γ(a, x). |
Example
round(upper_incomplete_gamma(1, 1), 6) # e^(-1) 0.367879
Complexity: O(terms)
Source code in shortfx/fxNumeric/special_functions.py
wallis_product(n: int) -> float
¶
Computes the Wallis product approximation for pi/2 using n terms.
pi/2 = product_{k=1}^{n} (4k^2) / (4k^2 - 1).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
n
|
int
|
Number of terms (positive integer). |
required |
Returns:
| Type | Description |
|---|---|
float
|
Approximation of pi/2. |
Raises:
| Type | Description |
|---|---|
TypeError
|
If n is not an integer. |
ValueError
|
If n < 1. |
Example
round(wallis_product(10000), 4) 1.5707
Complexity: O(n)
Source code in shortfx/fxNumeric/special_functions.py
weierstrass_p(z: float, omega1: float = 1.0, omega3_im: float = 1.0, terms: int = 10) -> float
¶
Computes the Weierstrass ℘-function for real z with rectangular lattice.
Uses the lattice with periods 2ω₁ (real) and 2iω₃ (pure imaginary). ℘(z) = 1/z² + Σ'_{(m,n)} [1/(z - 2mω₁ - 2niω₃)² - 1/(2mω₁ + 2niω₃)²].
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
z
|
float
|
Real argument (not a lattice point). |
required |
omega1
|
float
|
Real half-period (> 0). |
1.0
|
omega3_im
|
float
|
Imaginary half-period (> 0). |
1.0
|
terms
|
int
|
Number of lattice shells to sum. |
10
|
Returns:
| Type | Description |
|---|---|
float
|
℘(z) (approximately real for real z on rectangular lattice). |
Raises:
| Type | Description |
|---|---|
ValueError
|
If z is too close to a lattice point. |
Example
round(weierstrass_p(0.5, 1.0, 1.0, 10), 4) # doctest: +SKIP 4.0304
Complexity: O(terms^2)
Source code in shortfx/fxNumeric/special_functions.py
2574 2575 2576 2577 2578 2579 2580 2581 2582 2583 2584 2585 2586 2587 2588 2589 2590 2591 2592 2593 2594 2595 2596 2597 2598 2599 2600 2601 2602 2603 2604 2605 2606 2607 2608 2609 2610 2611 2612 2613 2614 2615 2616 2617 2618 2619 2620 2621 2622 2623 2624 2625 2626 2627 2628 2629 2630 2631 2632 2633 2634 2635 2636 2637 2638 2639 2640 2641 2642 | |