lib/more_math/functions.rb
# Returns the value of the gamma function, extended to a negative domain.
Returns the value of the gamma function, extended to a negative domain.
Returns the value of the gamma function extended to a negative domain .
def gamma(x)
      if x < 0.0
        return PI / (sin(PI * x) * exp(log_gamma(1 - x)))
      else
        exp(log_gamma(x))
      end
    end
def gamma ( x ) if x < 0.0 return PI / ( sin ( PI * x ) * exp ( log_gamma ( 1 - x ) ) ) else exp ( log_gamma ( x ) ) end end
Returns the value of the gamma function, extended to a negative domain.
Returns the value of the gamma function extended to a negative domain .
x
<not_specific>