Required Static Methodswift-numerics 1.0.3RealModule

signGamma(_:)

The sign of the gamma function, Γ(x).

RealFunctions.swift:114
static func signGamma(_ x: Self) -> FloatingPointSign

For x >= 0, signGamma(x) is .plus. For negative x, signGamma(x) is .plus when x is an integer, and otherwise it is .minus whenever trunc(x) is even, and .plus when trunc(x) is odd.

This function is used together with logGamma, which computes the logarithm of the absolute value of Γ(x), to recover the sign information.

Not available on Windows targets.

See also:

  • gamma()

  • logGamma()