Skip to content
Prev 157440 / 398506 Next

birthday problem (factorial limit)

On 28-Sep-08 17:51:55, Uwe Ligges wrote:
I would put it in an even "safer" form:

n <- 23
prod( ((365-(n-1)):365)/rep(365,n) )

In other word: It evaluates

 (343/365)*(344/365)* ... *(365/365)

365^N --> "Inf" if N > 120, whereas

  n<-150
  prod( ((365-(n-1)):365)/rep(365,n) )
# [1] 2.451222e-16

Best wishes,
Ted.

--------------------------------------------------------------------
E-Mail: (Ted Harding) <Ted.Harding at manchester.ac.uk>
Fax-to-email: +44 (0)870 094 0861
Date: 28-Sep-08                                       Time: 19:09:40
------------------------------ XFMail ------------------------------