> On Thu, Oct 28, 1999 at 08:59:44AM -0500, John_White at dell.com mentioned:
> > as easy as it would be to write one that gets the factorial of 5 :)
> > but you'd need a mad data type to store the result in . . .
>> That's part of the point! Lisp doesn't mind!
>> Question though. I was doing the lotto calculation, and:
>> ==> (/ (factorial 42) (factorial 36))
> 3776965920
>> Is it really a 3.777 billion to one chance of winning now ?
>> 42*41*40*39*38*37=3776965920
>> Kate
No, you've forgotten the 6! in the bottom line.
i.e. n
C = n!/[r!(n-r)!]
r
The odds against having the six numbers are only about 5.25 million to 1.
ATB,
Aidan.
Maintained by the ILUG website team. The aim of Linux.ie is to
support and help commercial and private users of Linux in Ireland. You can
display ILUG news in your own webpages, read backend
information to find out how. Networking services kindly provided by HEAnet, server kindly donated by
Dell. Linux is a trademark of Linus Torvalds,
used with permission. No penguins were harmed in the production or maintenance
of this highly praised website. Looking for the
Indian Linux Users' Group? Try here. If you've read all this and aren't a lawyer: you should be!