[R] help

Petr Savicky savicky at praha1.ff.cuni.cz
Wed Feb 2 13:11:40 CET 2011


On Tue, Feb 01, 2011 at 12:51:18PM -0800, Kiogou Lydie wrote:
> 
> 
> PLEASE HELP
> 
> I actually want to do the following:
> 
> a[j] = (1/(j!))*?? (i-1-d), j = 500, ?? means product i = 1 to
> j
> 
> ??
> 
> Yet, j! will stop at 170 and ?? (i-1-d) at 172; so, a[j] will
> not exceed 170.
> 
> I would like to have at least 200 a[j]. 
> 
> ??
> 
> WHAT SHOULD I DO?

Computing factorial of 171 and larger numbers may be done using
extended arithmetic in Rmpfr as already suggested. Depending
on the purpose of computing factorial of large numbers, consider
also the function lfactorial(), which computes the logarithm
in the standard numeric type.

  lfactorial(1000)

  [1] 5912.128

Hope this helps.

Petr Savicky.



More information about the R-help mailing list