Method: Math.beta_function

Defined in:
lib/math.rb

.beta_function(x, y) ⇒ Object



53
54
55
56
57
# File 'lib/math.rb', line 53

def self.beta_function(x, y)
  return 1 if x == 1 && y == 1

  (Math.gamma(x) * Math.gamma(y))/Math.gamma(x + y)
end