mars.tensor.special.
gammasgn
Sign of the gamma function.
It is defined as
where \(\Gamma\) is the gamma function; see gamma. This definition is complete since the gamma function is never zero; see the discussion after [dlmf].
x (array_like) – Real argument
Sign of the gamma function
scalar or ndarray
Notes
The gamma function can be computed as gammasgn(x) * np.exp(gammaln(x)).
gammasgn(x) * np.exp(gammaln(x))
See also
gamma
the gamma function
gammaln
log of the absolute value of the gamma function
loggamma
analytic continuation of the log of the gamma function
References
NIST Digital Library of Mathematical Functions https://dlmf.nist.gov/5.2#E1