Method: MoreMath::Functions.beta

Defined in:
lib/more_math/functions.rb

.beta(a, b) ⇒ Object

Returns the value of the beta function for (a, b), +a > 0, b > 0’.



54
55
56
57
58
59
60
# File 'lib/more_math/functions.rb', line 54

def beta(a, b)
  if a > 0 && b > 0
    exp(log_beta(a, b))
  else
    0.0 / 0
  end
end