Files
news.gitea.happylizard.me/bin/gems/facets-3.1.0/lib/standard/facets/math/beta.rb
T
pizza2d1 4cee170d66
Gitea Actions Demo / Explore-Gitea-Actions (push) Failing after 9s
Add bin and edit workflow
2026-09-16 13:11:16 -06:00

15 lines
283 B
Ruby

require 'facets/math/tgamma'
module Math
# Beta function of `x` and `y`.
#
# beta(x, y) = tgamma(x) * tgamma(y) / tgamma(x + y)
#
def self.beta(x, y)
#exp(lgamma(x).first + lgamma(y).first - lgamma(x+y).first)
tgamma(x) * tgamma(y) / tgamma(x + y)
end
end