WOLFRAM

BarnesG[z]

gives the Barnes G-function TemplateBox[{z}, BarnesG].

Details

  • BarnesG is also known as the double gamma function.
  • Mathematical function, suitable for both symbolic and numeric manipulation.
  • The Barnes G-function is defined as TemplateBox[{n}, BarnesG]=product_(k=1)^(n-1)TemplateBox[{k}, Gamma] for positive integers and is otherwise defined as TemplateBox[{z}, BarnesG]=(2 pi)^(z/2) exp((z-1) (TemplateBox[{z}, LogGamma]-z/2)-TemplateBox[{{-, 2}, z}, PolyGamma2]).
  • The Barnes G-function satisfies the functional equation TemplateBox[{{z, +, 1}}, BarnesG]=TemplateBox[{z}, BarnesG] TemplateBox[{z}, Gamma].
  • BarnesG[z] is an entire function of z with no branch cut discontinuities.
  • For certain special arguments, BarnesG automatically evaluates to exact values.
  • BarnesG can be evaluated to arbitrary numerical precision.
  • BarnesG automatically threads over lists.
  • BarnesG can be used with Interval and CenteredInterval objects. »

Examples

open allclose all

Basic Examples  (5)Summary of the most common use cases

Evaluate numerically:

Out[1]=1

Plot over a subset of the reals:

Out[1]=1

Plot over a subset of the complexes:

Out[1]=1

Series expansion at the origin:

Out[1]=1

Series expansion at Infinity:

Out[1]=1

Scope  (27)Survey of the scope of standard use cases

Numerical Evaluation  (6)

Evaluate numerically:

Out[1]=1
Out[2]=2

Evaluate to high precision:

Out[1]=1

The precision of the output tracks the precision of the input:

Out[2]=2

Complex number inputs:

Out[1]=1

Evaluate efficiently at high precision:

Out[1]=1
Out[2]=2

Compute worst-case guaranteed intervals using Interval and CenteredInterval objects:

Out[1]=1
Out[2]=2

Or compute average-case statistical intervals using Around:

Out[3]=3

Compute the elementwise values of an array:

Out[1]=1

Or compute the matrix BarnesG function using MatrixFunction:

Out[2]=2

Specific Values  (4)

Value at infinity:

Out[1]=1

Value at zero:

Out[1]=1

Evaluate symbolically at halfinteger arguments:

Out[1]=1

Evaluate symbolically at integer multiples of 1/4:

Out[2]=2

Find the first positive maximum:

Out[1]=1
Out[2]=2

Visualization  (2)

Plot the BarnesG function:

Out[1]=1

Plot the real part of :

Out[1]=1

Plot the imaginary part of :

Out[2]=2

Function Properties  (10)

BarnesG is defined for all real and complex values:

Out[1]=1
Out[2]=2

Approximate function range of BarnesG:

Out[1]=1

BarnesG is an analytic function of x:

Out[1]=1

BarnesG is neither non-increasing nor non-decreasing:

Out[1]=1

BarnesG is not injective:

Out[1]=1
Out[2]=2

BarnesG is surjective:

Out[1]=1
Out[2]=2

BarnesG is neither non-negative nor non-positive:

Out[1]=1

BarnesG has no singularities or discontinuities:

Out[1]=1
Out[2]=2

BarnesG is neither convex nor concave:

Out[1]=1

TraditionalForm formatting:

Differentiation  (2)

First derivative with respect to z:

Out[1]=1

Higher derivatives with respect to z:

Out[1]=1

Plot the higher derivatives with respect to z:

Out[2]=2

Series Expansions  (3)

Find the Taylor expansion using Series:

Out[1]=1

Plots of the first three approximations around :

Out[2]=2

Taylor expansion at a generic point:

Out[1]=1

Find the series expansion at Infinity:

Out[1]=1

Applications  (5)Sample problems that can be solved with this function

Integer values of BarnesG are related to the superfactorial:

Out[3]=3
Out[4]=4

BarnesG may be generated by symbolic solvers:

Out[1]=1
Out[2]=2
Out[3]=3

Compute the number of bits needed to store a large integer:

Out[1]=1

Compare to the exact result:

Out[2]=2

For an odd prime, a generalization of Wilson's theorem states that TemplateBox[{{{{(, {p, -, 1}, )}, !!}, =, {G, (, {p, +, 1}, )}}, p}, Mod]. Verify for the first few odd primes:

Out[1]=1

Define a Cauchy matrix constructed from the first positive integers and an integer shift :

Show the Cauchy matrix for arbitrary :

The determinant of this Cauchy matrix can be expressed in terms of BarnesG. Verify with a specific value of for the first few cases:

Out[3]=3

Properties & Relations  (2)Properties of the function, and connections to other functions

BarnesG satisfies a differential equation:

Out[1]=1
Out[2]=2
Out[3]=3

FindSequenceFunction can recognize the BarnesG sequence:

Out[1]=1
Out[2]=2

Neat Examples  (3)Surprising or curious use cases

Determinants of Hankel matrices built out of Bell numbers:

Out[1]=1
Out[2]=2

Determinants of Hankel matrices built out of Euler numbers:

Out[1]=1
Out[2]=2

The determinant of the Hilbert matrix can be expressed in terms of the Barnes G-function:

Verify the formula for the first few cases:

Out[2]=2
Wolfram Research (2008), BarnesG, Wolfram Language function, https://reference.wolfram.com/language/ref/BarnesG.html (updated 2022).
Wolfram Research (2008), BarnesG, Wolfram Language function, https://reference.wolfram.com/language/ref/BarnesG.html (updated 2022).

Text

Wolfram Research (2008), BarnesG, Wolfram Language function, https://reference.wolfram.com/language/ref/BarnesG.html (updated 2022).

Wolfram Research (2008), BarnesG, Wolfram Language function, https://reference.wolfram.com/language/ref/BarnesG.html (updated 2022).

CMS

Wolfram Language. 2008. "BarnesG." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2022. https://reference.wolfram.com/language/ref/BarnesG.html.

Wolfram Language. 2008. "BarnesG." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2022. https://reference.wolfram.com/language/ref/BarnesG.html.

APA

Wolfram Language. (2008). BarnesG. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/BarnesG.html

Wolfram Language. (2008). BarnesG. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/BarnesG.html

BibTeX

@misc{reference.wolfram_2025_barnesg, author="Wolfram Research", title="{BarnesG}", year="2022", howpublished="\url{https://reference.wolfram.com/language/ref/BarnesG.html}", note=[Accessed: 16-April-2025 ]}

@misc{reference.wolfram_2025_barnesg, author="Wolfram Research", title="{BarnesG}", year="2022", howpublished="\url{https://reference.wolfram.com/language/ref/BarnesG.html}", note=[Accessed: 16-April-2025 ]}

BibLaTeX

@online{reference.wolfram_2025_barnesg, organization={Wolfram Research}, title={BarnesG}, year={2022}, url={https://reference.wolfram.com/language/ref/BarnesG.html}, note=[Accessed: 16-April-2025 ]}

@online{reference.wolfram_2025_barnesg, organization={Wolfram Research}, title={BarnesG}, year={2022}, url={https://reference.wolfram.com/language/ref/BarnesG.html}, note=[Accessed: 16-April-2025 ]}