Hello. I probably did not say that correctly. Excel's ATP functions cannot
calculate at that precision. What I meant to say is that when one writes
their own vba Factorial function, you can use the functions in the ATP to
help your program if desired. The only reason I mentioned it is that
Charles has a very nice and interesting web page on Euler's equation, as
well as a discussion on Sin's & Cos's. After reading his excellent web
page, I got the impression that his final factorial code was written in the
time domain. I just pointed out that his excellent Factorial program using
Sin & Cos could be continued if he wanted using Excel's ATP.
With xlPrecision's 32,767 significant digits, the largest factorial it can
calculate is 10,958!.
I might be wrong, but 10,958! has 39,511 digits.
Digits[10958!]
39511
If you are limited to 2^15, or 32,768, then I believe the size is 9,274!
Digits[9274!]
32768
I know the following is not interesting, and this is an old thread. The
frequency domain is not all that much faster when calculating 364! because
the ratios of n^2 / (n*Log(2,n) is not that great. (That's log(n), base
2). However, when the numbers are large, like 9,274! with 32,767 digits, I
think it is about 200 times faster to do it in the frequency domain than the
time domain. This is an old thread so I'll stop. However, you are correct,
Excel's ATP can not do it directly.
--
Dana DeLouis
Using Windows XP & Office XP
= = = = = = = = = = = = = = = = =
"Greg Lovern" wrote in message
om...
what I am attempting to do is write a procedure for a certain range
of
"large" numbers in my example I would multiply 364 by 363 and store
the
results then multiply the stored results by 362 and store the results
then multiply the stored results by 361 etc.
Someone who's been following this string asked me how long xlPrecision
would take to calculate 364!. I thought some others might be
interested, so here's my reply:
---------------------------------------------------
On a worksheet, on my creaky old Athlon 800 (no money to upgrade..),
it took about 4 seconds to calculating 364! down a column.
In Excel VBA it took about 3 seconds:
========================================
Dim xlp As xlPrecision.cls_xlPrecision
Dim strRet As String
Dim i As Integer
Dim iStart As Double, iEnd As Double
Set xlp = CreateObject("xlPrecision.cls_xlPrecision")
strRet = 1
iStart = Time
For i = 1 To 364
strRet = xlp.xlpMULTIPLY(strRet, i)
Next i
iEnd = Time
Debug.Print Format(iEnd - iStart, "ss")
Workbooks(1).Worksheets(1).Cells(1).Value = strRet
---------------------------------------------------
I checked the answer against Charles Douglas Wehner's answer posted
2003-07-15 10:27:00 PST, and they are the same.
With xlPrecision's 32,767 significant digits, the largest factorial it
can calculate is 10,958!.
I guess I should add a xlpFACTORIAL function to xlPrecision. I've been
working on adding xlpROOT and xlpPOWER.
Take care,
Greg Lovern
http://PrecisionCalc.com
Get Your Numbers Right
================================================== =====