jax.scipy.special.gammasgn#
- jax.scipy.special.gammasgn(x)[source]#
Sign of the gamma function.
JAX implementation of
scipy.special.gammasgn
.\[\begin{split}\mathrm{gammasgn}(x) = \begin{cases} +1 & \Gamma(x) > 0 \\ -1 & \Gamma(x) < 0 \end{cases}\end{split}\]Where \(\Gamma\) is the
gamma()
function. Because \(\Gamma(x)\) is never zero, no condition is required for this case.if \(x = -\infty\), NaN is returned.
if \(x = \pm 0\), \(\pm 1\) is returned.
if \(x\) is a negative integer, NaN is returned. The sign of gamma at a negative integer depends on from which side the pole is approached.
if \(x = \infty\), \(1\) is returned.
if \(x\) is NaN, NaN is returned.
- Parameters:
x (ArrayLike) – arraylike, real valued.
- Returns:
array containing the sign of the gamma function
- Return type:
See also
jax.scipy.special.gamma()
: the gamma functionjax.scipy.special.gammaln()
: the natural log of the gamma function