sgnGamma

The sign of $(GAMMA)(x).

pure nothrow @safe @nogc pragma(inline, true)
real
sgnGamma
(
real x
)

Parameters

x real

the argument of $(GAMMA)

Return Value

Type: real

-1 if $(GAMMA)(x) < 0, +1 if $(GAMMA)(x) > 0, and NaN if $(GAMMA)(x) does not exist.

Note: This function can be used in conjunction with logGamma to evaluate $(GAMMA)(x) when gamma(x) is too large to be represented as a real.

Examples

assert(sgnGamma(10_000) == 1);

Meta