BarnesG
✖
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
for positive integers
and is otherwise defined as
.
- The Barnes G-function satisfies the functional equation
.
- 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 allBasic Examples (5)Summary of the most common use cases

https://wolfram.com/xid/0i1r01b9u-ba5pwi

Plot over a subset of the reals:

https://wolfram.com/xid/0i1r01b9u-hgmbqz

Plot over a subset of the complexes:

https://wolfram.com/xid/0i1r01b9u-kiedlx

Series expansion at the origin:

https://wolfram.com/xid/0i1r01b9u-fdkkja

Series expansion at Infinity:

https://wolfram.com/xid/0i1r01b9u-l1154

Scope (27)Survey of the scope of standard use cases
Numerical Evaluation (6)

https://wolfram.com/xid/0i1r01b9u-l274ju


https://wolfram.com/xid/0i1r01b9u-whe1w


https://wolfram.com/xid/0i1r01b9u-b0wt9

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

https://wolfram.com/xid/0i1r01b9u-y7k4a


https://wolfram.com/xid/0i1r01b9u-hfml09

Evaluate efficiently at high precision:

https://wolfram.com/xid/0i1r01b9u-di5gcr


https://wolfram.com/xid/0i1r01b9u-bq2c6r

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

https://wolfram.com/xid/0i1r01b9u-fa7g02


https://wolfram.com/xid/0i1r01b9u-ckvf5e

Or compute average-case statistical intervals using Around:

https://wolfram.com/xid/0i1r01b9u-cw18bq

Compute the elementwise values of an array:

https://wolfram.com/xid/0i1r01b9u-thgd2

Or compute the matrix BarnesG function using MatrixFunction:

https://wolfram.com/xid/0i1r01b9u-o5jpo

Specific Values (4)

https://wolfram.com/xid/0i1r01b9u-cgjpl5


https://wolfram.com/xid/0i1r01b9u-vddzg

Evaluate symbolically at half‐integer arguments:

https://wolfram.com/xid/0i1r01b9u-c0e21

Evaluate symbolically at integer multiples of 1/4:

https://wolfram.com/xid/0i1r01b9u-yqz2x

Find the first positive maximum:

https://wolfram.com/xid/0i1r01b9u-f2hrld


https://wolfram.com/xid/0i1r01b9u-m23tuu

Visualization (2)
Plot the BarnesG function:

https://wolfram.com/xid/0i1r01b9u-ecj8m7


https://wolfram.com/xid/0i1r01b9u-fjwo7k


https://wolfram.com/xid/0i1r01b9u-kkwb1

Function Properties (10)
BarnesG is defined for all real and complex values:

https://wolfram.com/xid/0i1r01b9u-cl7ele


https://wolfram.com/xid/0i1r01b9u-de3irc

Approximate function range of BarnesG:

https://wolfram.com/xid/0i1r01b9u-evf2yr

BarnesG is an analytic function of x:

https://wolfram.com/xid/0i1r01b9u-h5x4l2

BarnesG is neither non-increasing nor non-decreasing:

https://wolfram.com/xid/0i1r01b9u-g6kynf

BarnesG is not injective:

https://wolfram.com/xid/0i1r01b9u-gi38d7


https://wolfram.com/xid/0i1r01b9u-ctca0g

BarnesG is surjective:

https://wolfram.com/xid/0i1r01b9u-hkqec4


https://wolfram.com/xid/0i1r01b9u-hdm869

BarnesG is neither non-negative nor non-positive:

https://wolfram.com/xid/0i1r01b9u-84dui

BarnesG has no singularities or discontinuities:

https://wolfram.com/xid/0i1r01b9u-mdtl3h


https://wolfram.com/xid/0i1r01b9u-mn5jws

BarnesG is neither convex nor concave:

https://wolfram.com/xid/0i1r01b9u-kdss3

TraditionalForm formatting:

https://wolfram.com/xid/0i1r01b9u-ce5l4j

Differentiation (2)
First derivative with respect to z:

https://wolfram.com/xid/0i1r01b9u-krpoah

Higher derivatives with respect to z:

https://wolfram.com/xid/0i1r01b9u-z33jv

Plot the higher derivatives with respect to z:

https://wolfram.com/xid/0i1r01b9u-fxwmfc

Series Expansions (3)
Find the Taylor expansion using Series:

https://wolfram.com/xid/0i1r01b9u-ewr1h8

Plots of the first three approximations around :

https://wolfram.com/xid/0i1r01b9u-binhar

Taylor expansion at a generic point:

https://wolfram.com/xid/0i1r01b9u-jwxla7

Find the series expansion at Infinity:

https://wolfram.com/xid/0i1r01b9u-syq

Applications (5)Sample problems that can be solved with this function
Integer values of BarnesG are related to the superfactorial:

https://wolfram.com/xid/0i1r01b9u-otoq1v


https://wolfram.com/xid/0i1r01b9u-ek11jw

BarnesG may be generated by symbolic solvers:

https://wolfram.com/xid/0i1r01b9u-fdge24


https://wolfram.com/xid/0i1r01b9u-k5i0qc


https://wolfram.com/xid/0i1r01b9u-bnfck8

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

https://wolfram.com/xid/0i1r01b9u-lttqhm


https://wolfram.com/xid/0i1r01b9u-cixfb

For an odd prime, a generalization of Wilson's theorem states that
. Verify for the first few odd primes:

https://wolfram.com/xid/0i1r01b9u-ko861l

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

https://wolfram.com/xid/0i1r01b9u-dc0lxs
Show the Cauchy matrix for arbitrary :

https://wolfram.com/xid/0i1r01b9u-fcmpq

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

https://wolfram.com/xid/0i1r01b9u-0pepu

Properties & Relations (2)Properties of the function, and connections to other functions
BarnesG satisfies a differential equation:

https://wolfram.com/xid/0i1r01b9u-mehyrv


https://wolfram.com/xid/0i1r01b9u-ecqod9


https://wolfram.com/xid/0i1r01b9u-ik77xk

FindSequenceFunction can recognize the BarnesG sequence:

https://wolfram.com/xid/0i1r01b9u-hj2mn6


https://wolfram.com/xid/0i1r01b9u-5okec

Neat Examples (3)Surprising or curious use cases
Determinants of Hankel matrices built out of Bell numbers:

https://wolfram.com/xid/0i1r01b9u-lj3xvr


https://wolfram.com/xid/0i1r01b9u-ithb3e

Determinants of Hankel matrices built out of Euler numbers:

https://wolfram.com/xid/0i1r01b9u-cphole


https://wolfram.com/xid/0i1r01b9u-dqohau

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

https://wolfram.com/xid/0i1r01b9u-fmpbzq
Verify the formula for the first few cases:

https://wolfram.com/xid/0i1r01b9u-s7g6n

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
]}
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
]}