Skip to main content
Ctrl+K

XlCalcNet Documentation

  • Preface

Getting started

  • Setup and general usage
    • Setting up XlCalcNet
    • General and user interface functions
    • Calling Python from C#
    • Using XlCalcNet with spreadsheet formulas
    • Mathematical functions based on Mpmath, Gmpy2 and Python-Flint (only Python)
    • Mathematical functions in fixed precision
    • Mathematical functions based on XlCalcNet2
    • A quick look at Numpy
    • A quick look at Matplotlib and related libraries
    • A quick look at Pandas and Xlxswriter
    • A quick look at Scipy
    • A quick look at R, RStudio and Rpy2
  • Basic floating point functions
    • Operator overloading, general real functions
    • Machine constants, general
    • Properties of numbers
    • Integer related functions
    • Floating point functions for real numbers
    • Fraction and remainder related functions
    • Functions related to mantissa width and exponent range
    • Mathematical Constants
  • Elementary scalar functions (real and complex)
    • Complex components
    • Roots and quadratic, cubic, and quartic equations
    • Exponential and related functions
    • Logarithms and related functions
    • Power functions
    • Trigonometric functions, in radians
    • Trigonometric functions, in multiples of \(\pi\)
    • Hyperbolic functions
    • Inverse trigonometric functions, in radians
    • Inverse hyperbolic functions
    • Factorials, Gamma and related functions
    • Miscellaneous functions
  • Statistical Distributions
    • Introduction to random variables and distributions
    • Base class for univariate distributions
    • Base class for continuous univariate distributions
    • Base class for discrete univariate distributions
    • Closed form distributions, based on elementary functions
      • Boost: Arcsine Distribution
      • Boost: Cauchy distribution
      • Boost: Exponential distribution
      • Boost: Gumbel (Generalized Extreme Value distribution Type-I) distribution
      • Boost: Hyperexponential Distribution
      • !!!Boost: Kumaraswamy distribution
      • Boost: Laplace distribution
      • Boost: Logistic distribution
      • Boost: Pareto distribution
      • Boost: Rayleigh distribution
      • Boost: Triangular Distribution
      • Boost: Uniform distribution
      • Boost: Weibull (Minimum-Type-III) distribution
      • Dagum (Burr Type III) distribution
      • Fisk (log-logistic) distribution
      • Fréchet (Maximum/Minimum-Type-II or Inverse Weibull) distribution
      • Generalized Extreme Value (Maximum) or GEV distribution
      • Generalized Pareto distribution
      • Gompertz-Makeham distribution
      • Lomax distribution
      • Shifted Gompertz distribution
      • Singh-Maddala (Burr Type XII) distribution
    • Closed form distributions, based on the error function
      • !!!Boost: Lévy distribution
      • Boost: Lognormal (Johnson \(S_L\)) distribution
      • !!!Boost: Moyal Distribution
      • Boost: Normal (Johnson \(S_N\)) distribution
      • Boost: Skew normal Distribution
      • Boost: Wald (or Inverse Gaussian) distribution
      • Birnbaum-Saunders Distribution
      • Exponentially Modified Gaussian (EMG) distribution
      • Folded normal distribution
      • Half-normal distribution
      • Johnson \(S_B\) distribution
      • Johnson \(S_U\) distribution
      • Normal maximum distribution, \(\rho_{ij, i \ne j} = 0\)
      • Normal maximum modulus distribution, \(\rho_{ij, i \ne j} = 0\)
      • Sinh-arcsinh normal distribution
      • Truncated normal distribution
    • Closed form distributions, based on the incomplete gamma function
      • !!!Boost: Chi Distribution
      • Boost: Chi-Squared distribution
      • Boost: Gamma (Pearson Type III, Erlang) distribution
      • Boost: Inverse chisquared distribution
      • Boost: Inverse Gamma (Pearson Type V) distribution
      • !!!Boost: Maxwell Distribution
      • !!!Boost: Nakagami distribution
      • Amoroso distribution
      • Distribution of the logarithm of a \(\chi^2\) random variable
      • Hypoexponential (Generalized Erlang) Distribution
      • Lindley distribution (generalized)
      • Skew exponential power distribution
      • Stacy (generalized gamma) distribution
    • Closed form distributions, based on the incomplete beta function
      • Boost: Beta (Pearson Type I and II) distribution
      • Boost: Central Fisher F distribution
      • Boost: Student \(t\) (Pearson Type VII) distribution
      • Distribution of the negative logarithm of a beta variable
      • Beta-prime (Pearson Type VI) distribution
      • Generalized Beta (Type 1) distribution
      • Generalized Beta (Type 2) distribution
      • Generalized logistic distribution (JKB Types I - IV)
      • Generalized beta-exponential distribution
      • Feller-Pareto distribution
      • Fisher \(z\) distribution
      • Skew t-distribution (Jones)
      • Pearson’s rho distribution (under \(H_0\))
    • Noncentral distributions
      • Boost: Noncentral \(\chi^2\) distribution
      • Boost: Noncentral Student \(t\) distribution
      • Boost: Noncentral Fisher \(F\) distribution
      • Boost: Noncentral Beta Type I distribution
      • Noncentral Chi distribution
      • Rice (Nakagami-n) distribution
      • Noncentral distribution of the sample correlation coefficient
      • Distribution of the logarithm of a noncentral Beta Type II variable
      • Noncentral distribution (Type I) of Fisher’s \(R^2\)
      • Distribution of the logarithm of a noncentral Fisher \(1-R^2\) variable
      • Doubly non-central Student \(t\) distribution
      • Doubly non-central Fisher \(F\) distribution
    • Distributions related to multiple comparisons of means
      • Overview and literature
      • Normal maximum distribution, \(\rho_{ij, i \ne j} = \rho\)
      • Normal maximum modulus distribution, \(\rho_{ij, i \ne j} = \rho\)
      • Normal maximum distribution, \(\rho_{ij, i \ne j} = \lambda_i \lambda_j\)
      • Normal maximum modulus distribution, \(\rho_{ij, i \ne j} = \lambda_i \lambda_j\)
      • Normal range distribution
      • Studentized maximum distribution
      • Studentized maximum modulus distribution
      • Distribution of Dunnett’s \(t\), one-sided
      • Distribution of Dunnett’s \(t\), two-sided
      • Nair’s \(t\)-distribution
      • Halperin’s \(t\)-distribution
      • Nelson’s \(h\)-distribution
      • Studentized range distribution
    • Distributions related to multivariate statistical analysis
      • Distribution of the sum of the negative logarithms of independent beta variables
      • Distribution of the product of independent beta variables
      • Distribution of Wilks’ \(\Lambda\)
      • Distribution of Wilks’ \(L_{vc}\)
      • Distribution of Wilks’ \(L_{vcm}\)
      • Distribution of Wilks’ test of independence of \(p\) variates
      • Distribution of Wilks’ test of independence of \(k\) groups of variates
      • Distribution of Mauchly’s test of sphericity vs general structure
      • Distribution of Box’s test of equality of covariance matrices, equal sample sizes
      • Distribution of Box’s test of equality of k covariance matrices, unequal sample sizes
      • Distribution of Box’s test for same multivariate normal distributions, unequal sample sizes
      • Distribution of the modified likelihood ratio test (LRT) for a given covariance matrix
      • Distribution of the modified likelihood ratio test (LRT) for a given covariance matrix and mean vector
      • Central distribution of Roy’s largest root
      • Central distribution of Pillai’s \(V\)
      • Central distribution of Hotelling’s \(T^2\)
      • Noncentral Distribution of Wilks’ \(\Lambda\): MANOVA
      • Noncentral Distribution of Wilks’ \(\Lambda\): Canonical Correlation
    • Miscellaneous continuous distributions
      • Boost: Kolmogorov-Smirnov distribution (limiting form)
      • Boost: Landau Distribution
      • Boost: Holtsmark distribution
      • Boost: Map-Airy distribution
      • Boost: Saspoint5 distribution
      • Lévy alpha-stable distribution
      • Pearson Type IV distribution
      • Meixner distribution
      • Voigt Profile Distribution
      • Wrapped Cauchy distribution
      • Wrapped normal distribution
      • Von Mises distribution
      • Generalized inverse Gaussian distribution
      • Harmonic distribution
      • Halphen A distribution
      • Halphen B distribution
      • Halphen IB distribution
      • Generalized hyperbolic distribution
      • Hyperbolic distribution
      • Variance-gamma distribution
    • Elementary discrete (lattice) distributions
      • Boost: Bernoulli distribution
      • Boost: Geometric distribution
      • Boost: Poisson distribution
      • Boost: Binomial distribution
      • Boost: Negative binomial distribution
      • Boost: Classical hypergeometric distribution
      • Log-series distribution
      • Zeta distribution
      • Skellam distribution
      • Delaporte distribution
      • Beta-Poisson distribution (Quinkert)
      • Beta-binomial distribution
      • Beta-negative binomial distribution (Waring)
      • Negative hypergeometric distribution
      • Pólya-Eggenberger distribution
      • General hypergeometric distribution
      • Noncentral hypergeometric distribution, Fisher alternatives
    • Discrete (lattice) distributions related to (stratified) rank tests
      • Wilcoxon signed rank T distribution, continuous data
      • Noncentral Wilcoxon signed rank T distribution, Bennett alternatives
      • Mann-Whitney U distribution, continuous data
      • Noncentral Mann-Whitney U distribution, Lehmann alternatives
      • Noncentral Mann-Whitney U distribution, Milton alternatives
      • Kendall’s tau distribution, continuous data
      • Jonckheere-Terpsta \(T\) distribution, continuous data
      • Generalized Page \(L\) distribution, continuous data
      • Noncentral generalized Page \(L\) distribution, Milton alternatives
    • Discrete (non-lattice) distributions related to rank tests
      • Cochran-Friedman-Quade distribution
      • Kruskal-Wallis distribution
  • Numerical calculus
    • Introduction
    • DAMath: Numerical Rootfinding and Minimization
    • Boost/Math: Root Finding and Minimization Algorithms
    • Mpmath: Rootfinding and optimization
    • DAMath: Numerical Quadrature
    • Boost/Math: Numerical integration
    • Mpmath: Numerical integration
    • Mpmath: Numerical inverse Laplace transform
    • Boost/Odeint: Ordinary differential equations
    • Mpmath: Numerical differentiation
    • Mpmath: Asymptotic expansions
    • Mpmath: Function approximation
    • Mpmath: Sums, products, limits and extrapolation
    • Mpmath: Number identification
    • Mpmath: Polynomials
    • Eigen: Polynomials
    • Eigen/MinPack: non linear optimization
    • Eigen/CppOptLib: multidimensional optimization
    • Flint/Functions for polynomials
    • Flint/Power series and Taylor arithmetic
    • Flint/Verified numerical differentiation
    • Flint/Verified numerical integration
  • Eigen: Dense and Sparse Matrices
    • Creating scalars and matrices
    • Read-only properties: information about a matrix
    • Accessing and setting parts of a matrix
    • Changing the shape of a matrix and/or the order of coefficients
    • Basic arithmetic operations
    • Descriptive Statistics
    • Standard decompositions and linear solving
    • Singular Value and Eigen (selfadjoint) decompositions
    • Eigen decompositions of general square matrices
    • Eigen: Functions of matrix argument
    • Eigen: Fast Fourier Transform
  • Numpy: use with multiprecision data types
    • Numpy array creation from shape or value
    • Numpy array creation from existing data
    • Building special arrays for numerical work
    • Numpy indexing
    • Numpy basic array manipulation routines
    • Numpy array manipulation: Transpose-like operations
    • Numpy array manipulation: Changing number of dimensions
    • Numpy array manipulation: Joining arrays
    • Numpy array manipulation: Splitting and tiling arrays
    • Numpy array manipulation: Adding and removing elements
    • Numpy array manipulation: Rearranging elements
    • Numpy array manipulation: Sorting
    • Numpy array manipulation: Searching
    • Numpy mathematical functions: Sums, products, differences
    • Numpy mathematical functions: Extrema Finding
    • Numpy mathematical functions: Arithmetic operations, elementwise
    • Numpy mathematical functions: Averages and variances
    • Numpy mathematical functions: Matrix and vector products
    • Numpy logical functions: Truth value testing
    • Numpy mathematical functions: Integer and fractional
    • Numpy mathematical functions: Miscellaneous
    • Summary and examples: Numpy utility functions
    • Arithmetic operations with scalars and iterables
    • Numerical transformations and descriptive statistics
    • Standard decompositions and linear solving
    • Singular Value and Eigen decompositions
    • Analytic functions of a matrix
    • Discrete Fourier transform (DFT)
    • Flint/Functions for matrices

Special Functions

  • Elliptic functions and related
    • Carlson symmetric elliptic integrals
    • Legendre elliptic integrals (elliptic parameter \(m\))
    • Legendre elliptic integrals (elliptic modulus \(k\)), and related functions
    • Jacobi elliptic functions
    • Jacobi theta functions and related functions
    • Conversions of parameters of Weierstrass \(\wp\)
    • Weierstrass elliptic functions, in terms of elliptic period ratio \(\tau\)
    • Modular forms, in terms of half-period \(\omega_1\) and elliptic period ratio \(\tau\)
  • Lerch’s phi and related
    • Lerch’s transcendent and Lerch’s zeta
    • Polygamma and related functions
    • Polylogarithm and related functions
    • Hurwitz zeta and related functions
    • Riemann zeta function, and related functions
  • Hypergeometric function \(\,_0F_1\) and related
    • Hypergeometric Limit Function \(\,_0F_1\)
    • Bessel functions
    • Modified Bessel functions
    • Spherical Bessel functions
    • Modified spherical Bessel functions
    • Hankel functions
    • Airy functions
    • Kelvin functions
  • Hypergeometric function \(\,_1F_1\) and related
    • Hypergeometric Functions \(\,_1F_1\) (Kummer) and \(U\) (Tricomi)
    • Incomplete gamma functions
    • Coulomb, Whittaker and parabolic cylinder function
    • Error function and related functions
    • Exponential integrals, and related functions
  • Hypergeometric functions \(\,_2F_1\) and \(\,_1F_2\) (and related functions)
    • Gauss Hypergeometric Function \(\,_2F_1\)
    • Chebyshev, Gegenbauer and Jacobi polynomials
    • Legendre polynomials and related
    • Incomplete beta functions
    • Hypergeometric function \({}_1F_2\)
    • Scorer functions
    • Struve functions
    • Anger, Weber and Lommel functions

Supporting Functions

  • Algebra with random variables
    • Probability density function (pdf)
    • Probability mass function (pmf)
    • Cumulative distribution function (cdf)
    • Quantile function
    • Characteristic function
    • Moment generating function
    • Cumulant generating function
    • Probability generating function
    • Factorial Moments
    • Raw Moments
    • Central Moments
    • Cumulants
  • Series and integrals
    • Finite series algorithms for selected distributions
    • Infinite series algorithms for selected functions and distributions
    • Finite series for lattice distributions, based on factorial moments
    • Efficient integration of bell-shaped functions
    • Verified numerical integration
  • Pmf vectors
    • Basic discrete (lattice) distribution functions
    • Discrete (lattice) distribution functions related to (stratified) rank tests
    • Discrete (non-lattice) distribution functions related to rank tests
  • Fast approximations
    • Approximations based on the normal distribution
    • Approximations based on the chi-squared distribution
    • Approximations based on the central \(t\), \(F\) or beta distribution
    • Approximations based on the noncentral chi-squared distribution
    • Approximations based on the noncentral F or beta distribution
    • Approximations based on hypergeometric functions of scalar argument

Gallery of Plots

  • Visualisation of datasets
    • Bar Charts
    • Line and lollipop charts
    • Area Plots
    • Boxplot, Violinplot and Raincloud plot
    • Correlation and regression
    • Financial plots (requires mplfinance)
    • Geographic data (requires cartopy)
    • Geographic data (requires geopandas)
    • Parts of a whole
    • Arcplots, dendrograms, heatmaps and clustermaps
    • PlotTable
    • Flow and connections
    • Circular plots and flows
    • Network data (requires networkx)
  • Visualisation of functions and curves (2D)
    • Introduction to 2D functions and curves
    • Basic curves
    • Spirals
    • Decorative curves
    • General curve families
    • Field lines
    • Contours
    • Complex functions rendered as contours
    • Streams, barbs and quivers (some require cartopy)
  • Bitmaps
    • Fractals: introduction
    • Fractals related to the Mandelbrot set
    • Fractals related to the Julia set
    • Newton Fractals
    • Domain coloring options
    • Domain coloring: Examples part 1
  • Matplotlib 3D Graphics
    • Introduction
    • Matplotlib: 3D Graphics, part 2
    • S3dlib: Basic geometric figures
    • S3dlib: Real functions
    • S3dlib: Parametric Surfaces
    • S3dlib: Image mapping and clipping
    • S3dlib: Edge-to-edge surface coloring
    • S3dlib: Decorative parametric surfaces
    • S3dlib: Geometric and color datagrid mapping (requires scipy)
    • S3dlib: Implicit surfaces (requires scikit-image)
  • Plotly
    • General surface plots in 3D
    • Geographical plots
    • Sankey plots

Interactive 3D Wpf Plots

  • Wpf: Altitude surfaces in 3D, real and complex functions
    • Special techniques for height surfaces, real and complex functions
    • Scatterplots and building 3D scenes
    • Height plots of general bivariate real functions
  • Wpf: Parametric surfaces
    • Surfaces of translation
    • Surfaces of revolution: spheres and related
    • Generalisations of common surfaces
    • Minimal surfaces
    • Nonorientable (one-sided) Surfaces
    • Decorative parametric surfaces
  • Wpf: Path surfaces in 3D
    • Introduction to path surfaces
    • Functions with real input and complex results
    • Characteristic functions of statistical distributions
    • Helices and related curves traced on cylinders, cones and spheres
    • Coil springs
    • General knots
    • Torus knots
    • Lissajous knots
    • Polynomial knots
  • Wpf: Built-in 3D objects
    • Builtin solids with support for textures
    • Builtin solids without support for textures
    • Platonic solids, and related solids

User library: numerical

  • Additional Classes
    • User defined functions based on multiple precision arithmetic (Python)
    • User defined functions based on fixed precision arithmetic (C#)
    • User defined functions based on arbitrary precision arithmetic (C#)
    • Scalar functions
  • Distribution functions
    • Distributions related to multiple comparisons of means
    • Discrete (lattice) distribution functions related to (stratified) rank tests
    • Discrete (non-lattice) distribution functions related to rank tests
  • Inferential statistics
    • Basic classical statistical tests (stratified)
    • Basic classical statistical tests for 2 independent samples (stratified)
    • Basic classical statistical tests for 2 correlated samples (stratified)
    • Analysis of variance (ANOVA), orthogonal polynomials, and analysis of means (AOM)
    • Multiple comparisons of means
    • Nonparametric statistical tests, 1 or 2 samples
    • Nonparametric statistical tests, k samples
    • Multivariate statistical tests
  • Addditional elementary functions (real arguments, double precision)
    • Additional root, exponential, logarithmic and power functions
    • Additional Trigonometric functions (real arguments only)
    • Additional real error functions (real arguments only)
    • Additional real gamma functions (real arguments only)
    • Additional real incomplete gamma functions (real arguments only)
  • Addditional special functions (real arguments, double precision)
    • Conversions of parameters of elliptic functions
    • Additional elliptic integrals
    • Bulirsch elliptic integrals
    • Maple style elliptic integrals
    • Jacobi theta functions at \(x=0\) for \(0 \le q <1\)
    • Inverse Jacobi elliptic functions
    • Lemniscate functions
    • Neville theta functions
    • Polygamma, and related functions
    • Polylogarithm, and related functions
    • Riemann zeta, and related functions
    • Bessel functions of integer order
    • Modified Bessel functions of integer order
    • Integrals of zero-order Bessel functions
    • Kelvin functions of order 0
    • Synchrotron functions
    • Error function, and related functions
    • Exponential integrals, and related functions
    • Coulomb, Whittaker and parabolic cylinder function
    • Hypergeometric pFq, and related functions
    • Miscellaneous functions
  • Addditional special functions (complex arguments, double precision)
    • Conversions of parameters of Weierstrass \(\wp\)
    • Weierstrass elliptic functions, in terms of (real) lattice invariants \(g_2, g_3\)
    • Weierstrass elliptic functions, in terms of (real) lattice roots \(e_1, e_2\)
    • Weierstrass elliptic functions, in terms of lattice half-periods \(\omega_1\) and \(\omega_2\)
  • Addditional special functions (Mpmath)
    • Mpmath: Conversions of parameters of elliptic functions
    • Related to Lerch’s phi
    • Additional numbertheoretic functions
    • Generalized hypergeometric functions
    • Appell Functions
    • Q Functions
    • Further generalizations of gamma and hypergeometric functions

Back matter

  • License and History
    • Mozilla Public License Version 2.0
    • History

Indices

  • General Index
  • .rst

Hurwitz zeta and related functions

Contents

  • Hurwitz zeta function, \(\zeta(s,a)\)
    • ctx.hurwitz_zeta()
  • Generalized harmonic number function, \(H_x^{(r)}\)
    • math53.harmonic2()
  • Bernoulli numbers, \(B_n\)
    • ctx.bernoulli()
  • Bernoulli polynomials, \(B_n(x)\)
    • math53.bernpoly()
  • Euler numbers
    • ctx.eulernum()
  • Euler polynomials, \(E_n(x)\)
    • math53.eulerpoly()
  • Barnes G-function
    • ctxflint.barnes_g()
  • Logarithm of Barnes G function
    • ctx.logbarnes_g()
  • Hyperfactorial
    • ctxflint.hyperfactorial()
  • Superfactorial
    • ctxflint.superfactorial()

Hurwitz zeta and related functions#

Hurwitz zeta function, \(\zeta(s,a)\)#

ctx.hurwitz_zeta(s, a)#

where ctx is math53, ctxflint.

Returns the Hurwitz zeta function, defined as \(\displaystyle \zeta(s,a) = \sum_{k=0}^\infty \frac{1}{(a+k)^s} \,\), \(s>1, a \ne 0,-1,-2, \ldots\), and by analytic continuation for \(s \ne 0\). The amath implementation requires \(a>0\). If \(a=1\) then \(\zeta(s)\) is returned, and if \(s=0\) the result is \(\frac{1}{2}-a\).

See also Wikipedia [1431], MathWorld [1033], NIST [18], Ehrhardt [309] (3.6.6), Flint [827].

\[\zeta\left(-n,a\right)=-\frac{B_{n+1}\left(a\right)}{n+1}.\]
\[\zeta\left(s,1\right)=\zeta\left(s\right).\]
\[\zeta\left(s,\tfrac{1}{2}\right)=(2^{s}-1)\zeta\left(s\right).\]
\[\zeta'\left(0,a\right)=\log\Gamma\left(a\right)-\tfrac{1}{2}\log\left(2\pi\right).\]

This function is defined as

\[\zeta(s,a)=\sum_{k=0}^\infty \frac{1}{(k+a)^s} \quad (s>1, a \neq 0,-1,-2,\cdots),\]

and by continuation to \(s<1\). Note: the current implementation restricts the arguments to \(s \neq 1\) and \(a>0\). If \(a=1\) then \(\zeta(s)\) is returned, and if \(s=0\) the result is \(0.5-a\).

02_0a_TestHurwitzZetaFlint_0_re \(\quad\) 02_0b_TestHurwitzZetaFlint_0_im \(\quad\) 02_0c_TestHurwitzZetaFlint_0_abs

Left figure: real part of Hurwitz zeta function, \(\zeta(s,a)\). Camera angles are \(\theta=135^\circ\) and \(\phi = -12^\circ\), camera radius is -2.

Middle figure: imaginary part of Hurwitz zeta function, \(\zeta(s,a)\). Camera angles are \(\theta=135^\circ\) and \(\phi = -12^\circ\), camera radius is -2.

Right figure: absolute value of Hurwitz zeta function, \(\zeta(s,a)\), with color-coded phase. Camera angles are \(\theta=135^\circ\) and \(\phi = -12^\circ\), camera radius is -2.

02_1a_TestHurwitzZetaFlint_1_re \(\quad\) 02_1b_TestHurwitzZetaFlint_1_im \(\quad\) 02_1c_TestHurwitzZetaFlint_1_abs

Left figure: real part of Hurwitz zeta function, \(\zeta(s,a)\). Camera angles are \(\theta=135^\circ\) and \(\phi = -12^\circ\), camera radius is -2.

Middle figure: imaginary part of Hurwitz zeta function, \(\zeta(s,a)\). Camera angles are \(\theta=135^\circ\) and \(\phi = -12^\circ\), camera radius is -2.

Right figure: absolute value of Hurwitz zeta function, \(\zeta(s,a)\), with color-coded phase. Camera angles are \(\theta=135^\circ\) and \(\phi = -12^\circ\), camera radius is -2.

02_2a_TestHurwitzZetaFlint_2_re \(\quad\) 02_2b_TestHurwitzZetaFlint_2_im \(\quad\) 02_2c_TestHurwitzZetaFlint_2_abs

Left figure: real part of Hurwitz zeta function, \(\zeta(s,a)\). Camera angles are \(\theta=135^\circ\) and \(\phi = -12^\circ\), camera radius is -2.

Middle figure: imaginary part of Hurwitz zeta function, \(\zeta(s,a)\). Camera angles are \(\theta=135^\circ\) and \(\phi = -12^\circ\), camera radius is -2.

Right figure: absolute value of Hurwitz zeta function, \(\zeta(s,a)\), with color-coded phase. Camera angles are \(\theta=135^\circ\) and \(\phi = -12^\circ\), camera radius is -2.

An example in Python

>>> from xlcalcnet import xreal
>>> xreal.HurwitzZeta(2,5)
xreal('5.2359877559829887307E-1')
>>> xreal.HurwitzZeta(2,'51')
xreal('5.3518479027559984754E-1')

An example in Visual Basic

>>> from xlcalcnet import Gpr
>>> Gpr.HurwitzZeta(2,5)
Gpr('5.2359877559829887307E-1')
>>> Gpr.HurwitzZeta(2,'51')
Gpr('5.3518479027559984754E-1')

An example with real input:

>>> from xlcalcnet import dec, mpm, gmp, fpm, apm
>>> mpm.dps = 40; s = '10'; a = '1.5'
>>> \mathrm{d}x = dec.hurwitz(s, a); mx = mpm.hurwitz(s, a); gx = gmp.hurwitz(s, a)
>>> fx = fpm.hurwitz(s, a); ax = apm.hurwitz(s, a)
>>> mpm.show([\mathrm{d}x, mx, gx, fx, ax])
dec:  1.745035575790129990031595502635439715798E-2
mpm:  1.745035575790129990031595502635439715798e-2
gmp:  1.745035575790129990031595502635439715798E-02
fpm:  1.74503557579013E-02
apm:  1.745035575790129990031595502635439715798e-2 (1.028e-39%)

An example with complex input:

>>> from xlcalcnet import dec, mpm, gmp, fpm, apm
>>> mpm.dps = 20; s = '10 + 5j'; a = '5.0 + 3j'
>>> \mathrm{d}z = dec.hurwitz(s, a); mz = mpm.hurwitz(s, a); gz = gmp.hurwitz(s, a)
>>> fz = fpm.hurwitz(s, a); az = apm.hurwitz(s, a)
>>> mpm.show([\mathrm{d}z, mz, gz, fz, az],  aligned=True)
dec: -2.9834537360028672178E-8               - 3.9761878565611985695E-7j
mpm: -2.9834537360028672178e-8               - 3.9761878565611985695e-7j
gmp: -2.9834537360028672178E-08              - 3.9761878565611985695E-07j
fpm: -2.98345373600287E-08                   - 3.97618785656120E-07j
apm: -2.9834537360028672177e-8 (-8.461e-20%) - 3.9761878565611985695e-7 (-5.079e-20%)j

Generalized harmonic number function, \(H_x^{(r)}\)#

math53.harmonic2(x, s)#

Returns the generalized harmonic function \(H_x^{(r)} = \zeta(r) - \zeta(r,x+1)\) for \(r \ne 1\) and \(H_x^{(r)} = H_x\) for \(r = 1\).

See also: Wikipedia [1390], MathWorld [995], Ehrhardt [309] (3.6.21).

The generalized harmonic number function is defined as

\[H_x^{(r)} = \zeta(r) - \zeta(r, x+1) \quad x \ne 1,\]

and \(H_x^{(1)} = H_x\) for \(r=1\)

An example in Python

>>> from xlcalcnet import xreal
>>> xreal.Harmonic2(5, 10.5)
xreal('5.2359877559829887307E-1')
>>> xreal.Harmonic2(5, '10.1')
xreal('5.3518479027559984754E-1')

An example in Visual Basic

>>> from xlcalcnet import Gpr
>>> Gpr.Harmonic2(5, 10.5)
Gpr('5.2359877559829887307E-1')
>>> Gpr.Harmonic2(5, '10.1')
Gpr('5.3518479027559984754E-1')

An example with real input:

>>> from xlcalcnet import dec, mpm, gmp, fpm, apm
>>> mpm.dps = 40; x = '10'; r = '1.5'
>>> \mathrm{d}x = dec.harmonic2(x, r); mx = mpm.harmonic2(x, r); gx = gmp.harmonic2(x, r)
>>> fx = fpm.harmonic2(x, r); ax = apm.harmonic2(x, r)
>>> mpm.show([\mathrm{d}x, mx, gx, fx, ax])
dec:  1.995336493345601714521693592714339476261E+0
mpm:  1.995336493345601714521693592714339476261e+0
gmp:  1.995336493345601714521693592714339476261E+00
fpm:  1.99533649334560E+00
apm:  1.995336493345601714521693592714339476261e+0 (1.668e-38%)

An example with complex input:

>>> from xlcalcnet import dec, mpm, gmp, fpm, apm
>>> mpm.dps = 20; z = '10 + 5j'; r = '5.0 + 3j'
>>> \mathrm{d}z = dec.harmonic2(z, r); mz = mpm.harmonic2(z, r); gz = gmp.harmonic2(z, r)
>>> fz = fpm.harmonic2(z, r); az = apm.harmonic2(z, r)
>>> mpm.show([\mathrm{d}z, mz, gz, fz, az],  aligned=True)
dec: 9.8046716104400925422E-1              - 2.5426375920749034566E-2j
mpm: 9.8046716104400925422e-1              - 2.5426375920749034566e-2j
gmp: 9.8046716104400925422E-01             - 2.5426375920749034566E-02j
fpm: 9.80467161044009E-01                  - 2.54263759207490E-02j
apm: 9.8046716104400925422e-1 (8.639e-20%) - 2.5426375920749034566e-2 (-1.041e-19%)j

Bernoulli numbers, \(B_n\)#

ctx.bernoulli(n)#

where ctx is math53, ctxboost or ctxflint.

Note ctxboost.BernoulliB2n(n)

Returns the Bernoulli numbers \(B_n\), which are defined by their generating function \(\displaystyle \frac{1}{e^t-1} \sum_{n=0}^{\infty} B_n \frac{t^n}{n!}\), \(|t < 2\pi|\). If \(n<0\) or if \(n>2\) is odd, the result is \(0\), and \(B_1=-1/2\).

See also Wikipedia [1354], MathWorld [949], NIST [249], BoostMath [99], Ehrhardt [309] (3.10.2), Mpmath [608].

The function textsf{Bernoulli} returns the Bernoulli numbers \(B_n\), which are defined by their generating function

\[\frac{t}{e^t - 1} = \sum_{n=0}^{\infty} B_n \frac{t^n}{n!}, \quad |t| < 2\pi.\]

If \(n < 0\) or if \(n > 2\) is odd, the result is 0, and \(B_1 = -1/2\). If \(n \leq 120\) the function value is taken from a pre-calculated table. For large \(n\) the asymptotic approximation [30, 24.11.1]

\[(-1)^{n+1} B_{2n} \approx \frac{2(2n)!}{(2\pi)^{2n}} ,\]

gives an asymptotic recursion formula

\[B_{2n+2} \approx - \frac{(2n + 1)(2n + 2)}{(2\pi)^2} B_{2n},\]

which is used for computing \(B_n\) for \(120 < n \leq 2312\) from a pre-calculated table of values \(B_{32k+128} (0 \leq k \leq 68)\). The average iteration count is 4, and the maximum relative error of 4.5 eps occurs for \(n = 878\).

An example in Python

>>> from xlcalcnet import xreal
>>> xreal.Bernoulli(8)
xreal('5.2359877559829887307E-1')
>>> xreal.Bernoulli(14)
xreal('5.3518479027559984754E-1')

An example in Visual Basic

>>> from xlcalcnet import Gpr
>>> Gpr.Bernoulli(8)
Gpr('5.2359877559829887307E-1')
>>> Gpr.Bernoulli(14)
Gpr('5.3518479027559984754E-1')

An example:

>>> from xlcalcnet import dec, mpm, gmp, fpm, apm
>>> mpm.dps = 40; n = '16'
>>> \mathrm{d}x = dec.bernoulli(n); mx = mpm.bernoulli(n); gx = gmp.bernoulli(n)
>>> fx = fpm.bernoulli(n); ax = apm.bernoulli(n)
>>> mpm.show([\mathrm{d}x, mx, gx, fx, ax])
dec:  -7.092156862745098039215686274509803921569E+0
mpm:  -7.092156862745098039215686274509803921569e+0
gmp:  -7.092156862745098039215686274509803921569E+00
fpm:  -7.09215686274510E+00
apm:  -7.092156862745098039215686274509803921569e+0 (-1.295e-39%)

Bernoulli polynomials, \(B_n(x)\)#

math53.bernpoly(n, x)#

Returns \(\displaystyle B_n(x) = \sum_{n=0}^{\infty} \binom{n}{k} B_k x^{n-k}\), the Bernoulli polynomial of degree \(n \ge 0\).

See also Wikipedia [1355], MathWorld [950], NIST [249], Ehrhardt [309] (3.10.3), Flint [792], Mpmath [610].

The function calls acb_bernoulli_poly_ui in Flint.

The function returns the Bernoulli polynomials \(B_n (x)\) of degree \(n \geq 0\), defined by the generating function [30, 24.2.3]

\[\frac{te^{xt}}{e^t - 1} = \sum_{n=0}^{\infty} B_n(x) \frac{t^n}{n!}, \quad |t| < 2\pi.\]

or the simple explicit representation [30, 24.2.5]

\[B_n(x) = \sum_{n=0}^{\infty} \binom{n}{k} B_k(x) x^{n-k}.\]

See Amath for connection formula to Hurwitz Zeta.

An example in Python

>>> from xlcalcnet import xreal
>>> xreal.Bernpoly(3,4)
xreal('5.2359877559829887307E-1')
>>> xreal.Bernpoly(13,14)
xreal('5.3518479027559984754E-1')

An example in Visual Basic

>>> from xlcalcnet import Gpr
>>> Gpr.Bernpoly(3,4)
Gpr('5.2359877559829887307E-1')
>>> Gpr.Bernpoly(13,14)
Gpr('5.3518479027559984754E-1')

An example with real input:

>>> from xlcalcnet import dec, mpm, gmp, fpm, apm
>>> mpm.dps = 40; n = '16'; x = '1.5'
>>> \mathrm{d}x = dec.bernpoly(n, x); mx = mpm.bernpoly(n, x); gx = gmp.bernpoly(n, x)
>>> fx = fpm.bernpoly(n, x); ax = apm.bernpoly(n, x)
>>> mpm.show([\mathrm{d}x, mx, gx, fx, ax])
dec:  7.092428708543964460784313725490196078431E+0
mpm:  7.092428708543964460784313725490196078431e+0
gmp:  7.092428708543964460784313725490196078431E+00
fpm:  7.09242870854397E+00
apm:  7.092428708543964460784313725490196078432e+0 (1.457e-37%)

An example with complex input:

>>> from xlcalcnet import dec, mpm, gmp, fpm, apm
>>> mpm.dps = 20; n = '16'; z = '10 + 5j'
>>> \mathrm{d}z = dec.bernpoly(n, z); mz = mpm.bernpoly(n, z); gz = gmp.bernpoly(n, z)
>>> fz = fpm.bernpoly(n, z); az = apm.bernpoly(n, z)
>>> mpm.show([\mathrm{d}z, mz, gz, fz, az],  aligned=True)
dec: 9.1935042603632624118E+14              + 2.9617209867479000000E+16j
mpm: 9.1935042603632624118e+14              + 2.9617209867479000000e+16j
gmp: 9.1935042603632624118E+14              + 2.9617209867479000000E+16j
fpm: 9.19350426036326E+14                   + 2.96172098674790E+16j
apm: 9.1935042603632624118e+14 (1.089e-18%) + 2.9617209867479000000e+16 (1.03e-19%)j

Euler numbers#

ctx.eulernum(n)#

where ctx is math53, ctxflint.

Returns the Euler numbers \(E_n\). See also Wikipedia [1383], MathWorld [992], Flint [826], Ehrhardt [309] (3.10.8), Mpmath [637].

See also: arb_euler_number_ui

The Euler numbers \(E_n\) are defined as

\[E_n = \frac{4^n \beta(n+1)}{\zeta(n)} \frac{2B_n}{\pi}\]

An example:

>>> from xlcalcnet import dec, mpm, gmp, fpm, apm
>>> mpm.dps = 40; n = '16'
>>> \mathrm{d}x = dec.eulernum(n); mx = mpm.eulernum(n); gx = gmp.eulernum(n)
>>> fx = fpm.eulernum(n); ax = apm.eulernum(n)
>>> mpm.show([\mathrm{d}x, mx, gx, fx, ax])
dec:  1.939151214500000000000000000000000000000E+10
mpm:  1.939151214500000000000000000000000000000e+10
gmp:  1.939151214500000000000000000000000000000E+10
fpm:  1.93915121450000E+10
apm:  1.939151214500000000000000000000000000000e+10 (0.0%)

Euler polynomials, \(E_n(x)\)#

math53.eulerpoly(n, x)#

Returns \(\displaystyle E_n(x) = \frac{2}{n+1} \left( B_n(x)-2^{n+1}B_n\left(\frac{x}{2}\right) \right)\), the Euler polynomial of degree \(n \ge 0\). Special values include the Euler numbers \(E_n = 2^n E_n(1/2)\).

See also Wikipedia [1384], MathWorld [993], NIST [249], Ehrhardt [309] (3.10.9), Mpmath [638].

\[E_{n-1}\left(x\right)=\frac{2}{n}\left(B_{n}\left(x\right)-2^{n}B_{n}\left(\tfrac{1}{2}x\right)\right),\]
\[E_{n-1}\left(x\right)=\frac{2^{n}}{n}\left(B_{n}\left(\tfrac{1}{2}x+\tfrac{1}{2}\right)-B_{n}\left(\tfrac{1}{2}x\right)\right).\]

An example in Python

>>> from xlcalcnet import xreal
>>> xreal.Eulerpoly(3, 4)
xreal('5.2359877559829887307E-1')
>>> xreal.Eulerpoly(3, 12)
xreal('5.3518479027559984754E-1')

An example in Visual Basic

>>> from xlcalcnet import Gpr
>>> Gpr.Eulerpoly(3, 4)
Gpr('5.2359877559829887307E-1')
>>> Gpr.Eulerpoly(3, 12)
Gpr('5.3518479027559984754E-1')

An example with real input:

>>> from xlcalcnet import dec, mpm, gmp, fpm, apm
>>> mpm.dps = 40; n = '16'; x = '1.5'
>>> \mathrm{d}x = dec.eulerpoly(n, x); mx = mpm.eulerpoly(n, x); gx = gmp.eulerpoly(n, x)
>>> fx = fpm.eulerpoly(n, x); ax = apm.eulerpoly(n, x)
>>> mpm.show([\mathrm{d}x, mx, gx, fx, ax])
dec:  -2.958909933929443359375000000000000000000E+5
mpm:  -2.958909933929443359375000000000000000000e+5
gmp:  -2.958909933929443359375000000000000000000E+05
fpm:  -2.95890993392944E+05
apm:  -2.958909933929443359375000000000000000000e+5 (-3.254e-38%)

An example with complex input:

>>> from xlcalcnet import dec, mpm, gmp, fpm, apm
>>> mpm.dps = 20; n = '16'; z = '10 + 5j'
>>> \mathrm{d}z = dec.eulerpoly(n, z); mz = mpm.eulerpoly(n, z); gz = gmp.eulerpoly(n, z)
>>> fz = fpm.eulerpoly(n, z); az = apm.eulerpoly(n, z)
>>> mpm.show([\mathrm{d}z, mz, gz, fz, az],  aligned=True)
dec: -2.7730057139461850000E+15               + 2.6625051419981595000E+16j
mpm: -2.7730057139461850000e+15               + 2.6625051419981595000e+16j
gmp: -2.7730057139461850000E+15               + 2.6625051419981595000E+16j
fpm: -2.77300571394618E+15                    + 2.66250514199816E+16j
apm: -2.7730057139461850000e+15 (-6.053e-18%) + 2.6625051419981595000e+16 (7.45e-19%)j

Barnes G-function#

ctxflint.barnes_g(z)#

Returns the Barnes G-function of z. See also Wikipedia [1402], MathWorld [987], NIST [22], Whittaker and Watson [1171], Mpmath [656].

Evaluates the Barnes G-function, which generalizes the superfactorial (superfac()) and by extension also the hyperfactorial (hyperfac()) to the complex numbers in an analogous way to how the gamma function generalizes the ordinary factorial.

The Barnes G-function may be defined in terms of a Weierstrass product:

\[G(z+1) = (2\pi)^{z/2} e^{-[z(z+1)+\gamma z^2]/2} \prod_{n=1}^\infty \left[\left(1+\frac{z}{n}\right)^ne^{-z+z^2/(2n)}\right]\]

For positive integers \(n\), we have have relation to superfactorials \(G(n) = \mathrm{sf}(n-2) = 0! \cdot 1! \cdots (n-2)!\).

An example with real input:

>>> from xlcalcnet import dec, mpm, gmp, fpm, apm
>>> mpm.dps = 40; x = '1.5'
>>> \mathrm{d}x = dec.barnesg(x); mx = mpm.barnesg(x); gx = gmp.barnesg(x)
>>> fx = fpm.barnesg(x); ax = apm.barnesg(x)
>>> mpm.show([\mathrm{d}x, mx, gx, fx, ax])
dec:  1.069222649266412949543008878697891604653E+0
mpm:  1.069222649266412949543008878697891604653e+0
gmp:  1.069222649266412949543008878697891604653E+00
fpm:  1.06922264926641E+00
apm:  1.069222649266412949543008878697891604653e+0 (2.147e-39%)

An example with complex input:

>>> from xlcalcnet import dec, mpm, gmp, fpm, apm
>>> mpm.dps = 20; z = '10 + 5j'
>>> \mathrm{d}z = dec.barnesg(z); mz = mpm.barnesg(z); gz = gmp.barnesg(z)
>>> fz = fpm.barnesg(z); az = apm.barnesg(z)
>>> mpm.show([\mathrm{d}z, mz, gz, fz, az],  aligned=True)
dec: 4.0615260490805827996E+3              - 1.5756073051910381056E+3j
mpm: 4.0615260490805827996e+3              - 1.5756073051910381056e+3j
gmp: 4.0615260490805827996E+03             - 1.5756073051910381056E+03j
fpm: 4.06152604908058E+03                  - 1.57560730519104E+03j
apm: 4.0615260490805827996e+3 (8.969e-19%) - 1.5756073051910381056e+3 (-2.808e-18%)j

Logarithm of Barnes G function#

ctx.logbarnes_g(x)#

where ctx is math53 or ctxflint.

Returns \(\log G(z)\), the logarithm of Barnes \(G\) function, with \(\log G(z) = z \log\Gamma(z) + \zeta'(1) - \zeta'(-1,z)\).

See also: Wikipedia [1402], MathWorld [987], MathWorld [1003], NIST [22], Ehrhardt [309] (3.5.6.9).

Computes Barnes G-function or the logarithmic Barnes G-function, respectively. The logarithmic version has branch cuts on the negative real axis and is continuous elsewhere in the complex plane, in analogy with the logarithmic gamma function. The functional equation

\[\log G(z+1) = \log \Gamma(z) + \log G(z).\]

holds for all z.

For small integers, we directly use the recurrence relation \(G(z+1) = \Gamma(z) G(z)\) together with the initial value \(G(1) = 1\). For general z, we use the formula

\[\log G(z) = (z-1) \log \Gamma(z) - \zeta'(-1,z) + \zeta'(-1).\]

An example in Python

>>> from xlcalcnet import xreal
>>> xreal.LogBarnesG(7.1)
xreal('5.2359877559829887307E-1')
>>> xreal.LogBarnesG('4.51')
xreal('5.3518479027559984754E-1')

An example in Visual Basic

>>> from xlcalcnet import Gpr
>>> Gpr.LogBarnesG(7.1)
Gpr('5.2359877559829887307E-1')
>>> Gpr.LogBarnesG('4.51')
Gpr('5.3518479027559984754E-1')

An example with real input:

>>> from xlcalcnet import dec, mpm, gmp, fpm, apm
>>> mpm.dps = 40; x = '1.5'
>>> \mathrm{d}x = dec.Logbarnesg(x); mx = mpm.Logbarnesg(x); gx = gmp.Logbarnesg(x)
>>> fx = fpm.Logbarnesg(x); ax = apm.Logbarnesg(x)
>>> mpm.show([\mathrm{d}x, mx, gx, fx, ax])
dec:  6.693188843500470427402868586818440410225E-2
mpm:  6.693188843500470427402868586818440410225e-2
gmp:  6.693188843500470427402868586818440410225E-02
fpm:  6.69318884350047E-02
apm:  6.693188843500470427402868586818440410225e-2 (2.144e-39%)

An example with complex input:

>>> from xlcalcnet import dec, mpm, gmp, fpm, apm
>>> mpm.dps = 20; z = '10 + 5j'
>>> \mathrm{d}z = dec.Logbarnesg(z); mz = mpm.Logbarnesg(z); gz = gmp.Logbarnesg(z)
>>> fz = fpm.Logbarnesg(z); az = apm.Logbarnesg(z)
>>> mpm.show([\mathrm{d}z, mz, gz, fz, az],  aligned=True)
dec: 8.3794095077852315352E+0              - 3.7006227106476637064E-1j
mpm: 8.3794095077852315352e+0              - 3.7006227106476637064e-1j
gmp: 8.3794095077852315352E+00             - 3.7006227106476637064E-01j
fpm: 8.37940950778523E+00                  - 3.70062271064766E-01j
apm: 8.3794095077852315352e+0 (1.617e-19%) + 5.6178605493551511922e+1 (4.825e-20%)j

Hyperfactorial#

ctxflint.hyperfactorial(z)#

Returns the hyperfactorial of z. See also Wikipedia [1391], MathWorld [998], of Integer Sequences [450], Mpmath [663].

Computes the hyperfactorial, defined for integers as the product

\[H(n) = \prod_{k=1}^n k^k.\]

The hyperfactorial satisfies the recurrence formula \(H(z) = z^z H(z-1)\). It can be defined more generally in terms of the Barnes G-function (see barnesg()) and the gamma function by the formula

\[H(z) = \frac{\Gamma(z+1)^z}{G(z+1)}.\]

An example with real input:

>>> from xlcalcnet import dec, mpm, gmp, fpm, apm
>>> mpm.dps = 40; x = '1.5'
>>> \mathrm{d}x = dec.hyperfac(x); mx = mpm.hyperfac(x); gx = gmp.hyperfac(x)
>>> fx = fpm.hyperfac(x); ax = apm.hyperfac(x)
>>> mpm.show([\mathrm{d}x, mx, gx, fx, ax])
dec:  1.617488527948946062817035460231792759012E+0
mpm:  1.617488527948946062817035460231792759012e+0
gmp:  1.617488527948946062817035460231792759012E+00
fpm:  1.61748852794895E+00
apm:  1.617488527948946062817035460231792771778e+0 (2.059e-33%)

An example with complex input:

>>> from xlcalcnet import dec, mpm, gmp, fpm, apm
>>> mpm.dps = 20; z = '10.5 + 1j'
>>> \mathrm{d}z = dec.hyperfac(z); mz = mpm.hyperfac(z); gz = gmp.hyperfac(z)
>>> fz = fpm.hyperfac(z); az = apm.hyperfac(z)
>>> mpm.show([\mathrm{d}z, mz, gz, fz, az],  aligned=True)
dec: 4.6669290555030590228E+48              + 1.2961711093304818907E+49j
mpm: 4.6669290555030590228e+48              + 1.2961711093304818907e+49j
gmp: 4.6669290555030590228E+48              + 1.2961711093304818907E+49j
fpm: 4.66692905550306E+48                   + 1.29617110933048E+49j
apm: 4.6669290555030590228e+48 (5.257e-17%) + 1.2961711093304818907e+49 (3.064e-17%)j

Superfactorial#

ctxflint.superfactorial(z)#

Returns the Superfactorial of z. See also Wikipedia [1398], MathWorld [1009], of Integer Sequences [451], Mpmath [668].

Computes the superfactorial, defined as the product of consecutive factorials

\[\mathrm{sf}(n) = \prod_{k=1}^n k!\]

For general complex \(z\), \(\mathrm{sf}(z)\) is defined in terms of the Barnes G-function (see barnesg()).

\[\mathrm{sf}(z) = G(z+2)\]

An example with real input:

>>> from xlcalcnet import dec, mpm, gmp, fpm, apm
>>> mpm.dps = 40; x = '1.5'
>>> \mathrm{d}x = dec.superfac(x); mx = mpm.superfac(x); gx = gmp.superfac(x)
>>> fx = fpm.superfac(x); ax = apm.superfac(x)
>>> mpm.show([\mathrm{d}x, mx, gx, fx, ax])
dec:  1.259648257495192144086307951096069825563E+0
mpm:  1.259648257495192144086307951096069825563e+0
gmp:  1.259648257495192144086307951096069825563E+00
fpm:  1.25964825749519E+00
apm:  1.259648257495192144086307951096069825563e+0 (9.113e-40%)

An example with complex input:

>>> from xlcalcnet import dec, mpm, gmp, fpm, apm
>>> mpm.dps = 20; z = '10.5 + 1j'
>>> \mathrm{d}z = dec.superfac(z); mz = mpm.superfac(z); gz = gmp.superfac(z)
>>> fz = fpm.superfac(z); az = apm.superfac(z)
>>> mpm.show([\mathrm{d}z, mz, gz, fz, az],  aligned=True)
dec: 1.8638249390462723001E+30             - 8.9432323302755030353E+30j
mpm: 1.8638249390462723001e+30             - 8.9432323302755030353e+30j
gmp: 1.8638249390462723001E+30             - 8.9432323302755030353E+30j
fpm: 1.86382493904627E+30                  - 8.94323233027550E+30j
apm: 1.8638249390462723001e+30 (2.42e-18%) - 8.9432323302755030353e+30 (-1.345e-18%)j

previous

Polylogarithm and related functions

next

Riemann zeta function, and related functions

Contents
  • Hurwitz zeta function, \(\zeta(s,a)\)
    • ctx.hurwitz_zeta()
  • Generalized harmonic number function, \(H_x^{(r)}\)
    • math53.harmonic2()
  • Bernoulli numbers, \(B_n\)
    • ctx.bernoulli()
  • Bernoulli polynomials, \(B_n(x)\)
    • math53.bernpoly()
  • Euler numbers
    • ctx.eulernum()
  • Euler polynomials, \(E_n(x)\)
    • math53.eulerpoly()
  • Barnes G-function
    • ctxflint.barnes_g()
  • Logarithm of Barnes G function
    • ctx.logbarnes_g()
  • Hyperfactorial
    • ctxflint.hyperfactorial()
  • Superfactorial
    • ctxflint.superfactorial()

By Dietrich Hadler

© Copyright 2026, Dietrich Hadler. .

Last updated on Aug 19, 2026.