maxframe.tensor.special.gammasgn#
- maxframe.tensor.special.gammasgn(x, out=None)[source]#
Sign of the gamma function.
It is defined as
\[\begin{split}\text{gammasgn}(x) = \begin{cases} +1 & \Gamma(x) > 0 \\ -1 & \Gamma(x) < 0 \end{cases}\end{split}\]where \(\Gamma\) is the gamma function; see gamma. This definition is complete since the gamma function is never zero; see the discussion after [dlmf].
- Parameters:
x (array_like) – Real argument
out (ndarray, optional) – Optional output array for the function values
- Returns:
Sign of the gamma function
- Return type:
scalar or ndarray
See also
Notes
The gamma function can be computed as
gammasgn(x) * np.exp(gammaln(x)).References
[dlmf]NIST Digital Library of Mathematical Functions https://dlmf.nist.gov/5.2#E1