At 04:53 PM 10/24/2009, R_help Help wrote:
Hi - I ran into a problem when the argument to gamma function is
large. Says, if I do the following:
> gamma(17000)
[1] Inf
Warning message:
value out of range in 'gammafn'
Is there anyway to get around this or other implementation? Thank you.
-rc
T
Use the lgamma function.
> log(gamma(170))
[1] 701.4373
> lgamma(170)
[1] 701.4373
>
In typical uses of gamma(), they are multiplied or divided
by other gamma() values, bringing the final result into the
range of double precision numbers.
Also, look at beta(), which does those divisions of gamm
Hi - I ran into a problem when the argument to gamma function is
large. Says, if I do the following:
> gamma(17000)
[1] Inf
Warning message:
value out of range in 'gammafn'
Is there anyway to get around this or other implementation? Thank you.
-rc
__
3 matches
Mail list logo