Re: factorial function

2003-11-27 Thread Robert Brown
Shawn O'Donnell writes: > >Does anyone have any suggestions on how to create an array to hold the value > >of 1000 factorial? > > Do you mean 1000! > > That's a super-sized number--something like 10-to-the-2566th power, > if I am using Sterling's approximation correctly. > > I don't kn

Re: factorial function

2003-11-26 Thread R. Joseph Newton
Rob Dixon wrote: > B. Rothstein wrote: > > > > Does anyone have any suggestions on how to create an array to hold the value > > of 1000 factorial? > > Hi. > > Use Math::BigInt. The program below stores the first 1000 factorials into an > array and prints out the thousandth, which is 2568 digits lo

RE: factorial function

2003-11-26 Thread Bob Showalter
[EMAIL PROTECTED] wrote: > > B. Rothstein wrote: > > > Does anyone have any suggestions on how to create an array to > > > hold the value of 1000 factorial? > > > > This will compute it: > > > > perl -MMath::BigInt -le '$n = Math::BigInt->new("1"); $n *= $_ for > > 2..1000; print $n' > > > > in

RE: factorial function

2003-11-26 Thread drowl
> B. Rothstein wrote: >> Does anyone have any suggestions on how to create an array to hold the >> value of 1000 factorial? > > This will compute it: > > perl -MMath::BigInt -le '$n = Math::BigInt->new("1"); $n *= $_ for > 2..1000; print $n' > in trying to understand this i guess that: $n = Math:

RE: factorial function

2003-11-26 Thread Bob Showalter
B. Rothstein wrote: > Does anyone have any suggestions on how to create an array to hold > the value of 1000 factorial? This will compute it: perl -MMath::BigInt -le '$n = Math::BigInt->new("1"); $n *= $_ for 2..1000; print $n' You can stick the result in an array if you want... -- To unsubscr

Re: factorial function

2003-11-26 Thread Rob Dixon
B. Rothstein wrote: > > Does anyone have any suggestions on how to create an array to hold the value > of 1000 factorial? Hi. Use Math::BigInt. The program below stores the first 1000 factorials into an array and prints out the thousandth, which is 2568 digits long. It also runs incredibly quickl

Re: factorial function

2003-11-26 Thread drowl
>>Does anyone have any suggestions on how to create an array to hold the >> value of 1000 factorial? > > Do you mean 1000! > > That's a super-sized number--something like 10-to-the-2566th power, if > I am using Sterling's approximation correctly. > > I don't know of a numeric type that stores suc

Re: factorial function

2003-11-26 Thread Shawn O'Donnell
Does anyone have any suggestions on how to create an array to hold the value of 1000 factorial? Do you mean 1000! That's a super-sized number--something like 10-to-the-2566th power, if I am using Sterling's approximation correctly. I don't know of a numeric type that stores such animals. If you

Re: factorial function

2003-11-25 Thread Robert Brown
James Edward Gray II writes: > On Nov 26, 2003, at 1:35 AM, B. Rothstein wrote: > > > Does anyone have any suggestions on how to create an array to hold the > > value > > of 1000 factorial? > > I'm afraid I don't understand your question. An array holds multiple > values, but 1,000 fac

Re: factorial function

2003-11-25 Thread James Edward Gray II
On Nov 26, 2003, at 1:35 AM, B. Rothstein wrote: Does anyone have any suggestions on how to create an array to hold the value of 1000 factorial? I'm afraid I don't understand your question. An array holds multiple values, but 1,000 factorial is a single value. You want an array to hold all th