mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
rdoc update.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25825 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
85bf0a2eb6
commit
10b7e0e4ad
1 changed files with 1 additions and 1 deletions
2
math.c
2
math.c
|
@ -600,7 +600,7 @@ math_erfc(VALUE obj, VALUE x)
|
|||
* Calculates the gamma function of x.
|
||||
*
|
||||
* Note that gamma(n) is same as fact(n-1) for integer n > 0.
|
||||
* However gamma(n) returns float and possibly has error in calculation.
|
||||
* However gamma(n) returns float and can be an approximation.
|
||||
*
|
||||
* def fact(n) (1..n).inject(1) {|r,i| r*i } end
|
||||
* 1.upto(26) {|i| p [i, Math.gamma(i), fact(i-1)] }
|
||||
|
|
Loading…
Reference in a new issue