Function Repository Resource:

HadamardGamma

Source Notebook

Evaluate the Hadamard gamma function

Contributed by: Jan Mangaldan

ResourceFunction["HadamardGamma"][z]

gives the Hadamard gamma function H(z).

Details

Mathematical function, suitable for both symbolic and numerical manipulation.
The Hadamard gamma function is an extension of the factorial to complex arguments, just like the usual Euler gamma function. Unlike the gamma function, however, the Hadamard gamma function is an entire function (i.e., no poles at the nonpositive integers).
The Hadamard gamma function satisfies the functional equation .
For certain special arguments, ResourceFunction["HadamardGamma"] automatically evaluates to exact values.
ResourceFunction["HadamardGamma"] can be evaluated to arbitrary numerical precision.
ResourceFunction["HadamardGamma"] automatically threads over lists.

Examples

Basic Examples (3) 

Evaluate the Hadamard gamma function on integer values:

In[1]:=
Table[ResourceFunction["HadamardGamma"][n], {n, -5, 5}]
Out[1]=

Half-integer values:

In[2]:=
Table[ResourceFunction["HadamardGamma"][n + 1/2], {n, -2, 2}]
Out[2]=

Plot over a subset of the reals:

In[3]:=
Plot[ResourceFunction["HadamardGamma"][z], {z, -2, 3}]
Out[3]=

Scope (4) 

Evaluate numerically:

In[4]:=
ResourceFunction["HadamardGamma"][0.33]
Out[4]=

Evaluate to arbitrary precision:

In[5]:=
N[ResourceFunction["HadamardGamma"][1/3], 50]
Out[5]=

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

In[6]:=
ResourceFunction["HadamardGamma"][0.3333333333333333333333333333]
Out[6]=

Evaluate for complex argument:

In[7]:=
ResourceFunction["HadamardGamma"][0.5 - I]
Out[7]=

HadamardGamma threads elementwise over lists:

In[8]:=
ResourceFunction["HadamardGamma"][{2, 3, 5, 7, 11}]
Out[8]=

Applications (2) 

Compare the gamma function with the Hadamard gamma function:

In[9]:=
Plot[{Gamma[z], ResourceFunction["HadamardGamma"][z]}, {z, -4, 5}, {Axes -> None, Frame -> True, PlotLegends -> {
Gamma[z], 
H[z]}}]
Out[9]=

Visualize the difference between the gamma function and the Hadamard gamma function in the complex plane:

In[10]:=
ComplexPlot[
 Gamma[z] - ResourceFunction["HadamardGamma"][z], {z, -5 - 5 I, 5 + 5 I}, ColorFunction -> "CyclicLogAbsArg"]
Out[10]=

Properties and Relations (1) 

Verify a functional equation for the Hadamard gamma function:

In[11]:=
ResourceFunction["HadamardGamma"][z + 1] == z  ResourceFunction["HadamardGamma"][z] + 1/Gamma[1 - z] /. z -> RandomComplex[1 + I, WorkingPrecision -> 20]
Out[11]=

Requirements

Wolfram Language 12.3 (May 2021) or above

Version History

  • 1.0.0 – 25 March 2024

Related Resources

License Information