Method: Math.lower_incomplete_gamma_function
- Defined in:
- lib/math.rb
.lower_incomplete_gamma_function(s, x) ⇒ Object
46 47 48 49 50 51 |
# File 'lib/math.rb', line 46 def self.lower_incomplete_gamma_function(s, x) # The greater the iterations, the better. That's why we are iterating 10_000 * x times self.simpson_rule(0, x, (10_000 * x.round).round) do |t| (t ** (s - 1)) * Math.exp(-t) end end |