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 know of a numeric type that stores such animals.  If you 
 > wanted to store this as an integer type, you'd need an 8500+ bit 
 > integer representation.  You could roll your own data type if you 
 > felt the need.  But you'd have to roll your own multiplication 
 > operator, too.
 > 
 > If you really, really need to do this, think about using logarithms. 
 > Don't expect precise results, though.  And make sure you really, 
 > really want to do this.
 > 
 > --Shawn

Extended precision integer arithmetic packages are part of common
lisp, and are available in other languages.  If you want to implement
your own, consult the seminal "The art of computer programming, vol 2, 
seminumerical algorithms" by Knuth for details of implementation and
theoretical analysis.
Rj

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to