View Single Post
  #6   Report Post  
Posted to microsoft.public.excel.programming
Charles Douglas Wehner Charles Douglas Wehner is offline
external usenet poster
 
Posts: 8
Default Frustrated with Factorials

"Dana DeLouis" wrote in message ...
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.


All good modern mathematics grows out of the established Art. However,
there is a process of RATIONALISING IN THE MIND - of creating simple
MIND IMAGES - before one has enough clarity of understanding with
which to attempt the new.

Such "tricks" as my "FOUR-BOX ALGORITHM" and a visualisation of the
"EULER SPIRAL" make things clear. However, to those who have not seen
the page, references to a "spiral in complex space" may seem like
mysticism.


..., I got the impression that his final factorial code was written in the
time domain.


No. What I did at that point was to emphasise that there is a FLAW in
complex arithmetic. It often GOES WRONG when "amateurs" apply it in a
mechanical fashion without using common sense.

Electronic engineers - working with REPETITIVE CYCLIC functions in the
TIME DOMAIN can usually get away with using complex maths. This is
because sinusoidal oscillators produce waves where one is very much
like the other.

Having shown that the user of complex maths is restricted to cyclic
functions, I returned to studies of the Gamma function (or what I call
fRactorials - FRACTIONAL factorials). I was now no longer dealing with
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.


The RECIPROCAL of the Gamma (my Eucalculus curve) seems to spiral in
complex space.

One would apply Sin & Cos IF IT DID.

However, I found out that the spiral is LEFT-HANDED whilst also being
RIGHT-HANDED.

Such an AMBIDEXTROUS spiral is NONSENSE. There is no way of turning
left whilst symmetrically turning right.

Therefore there is no Sin or Cos in the Gamma function.

But more than this - Nature has shown that the Gamma function is
INCOMPATIBLE with complex maths. ONE OR OTHER of these is an ARTEFACT
OF MAN. Perhaps BOTH.


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 had built my own laboratory-standard maths, but no longer have it. I
had to flee from Britain at the time the Iraq war was brewing.

Without notes, I can only remember that my 2-byte exponent gave 10 to
the 9863 down to 10 to the -9862.

Divide by 256 for 1-byte: 10 to the 38.5

So one-byte-exponent maths is very poor on factorials. Two bytes does
indeed go to about 1500! - but I do not know the EXACT limit.
Certainly it is better than 34! which gives 2.9523279 times ten to the
38.

Four bytes, in my estimation is OVERKILL. Even three bytes would be a
waste, because very few people want to go above 1500! Those who do
would have to buy a special math system.

The coefficients of my f(r)actorial program are of the form
A + B(X) +C(X-squared)... where A, B, C &c are EMPIRICAL.

Due to the "transfinite" convergence, there seems to be no rational
connexion between A, B, C &c.

I was using my own huge maths - when I had it - in roughly the
following way:

Consider the Arc tangent giving coefficients:
1.000000000001
-0.333333333354
0.200000000176
-0.142857141234
0.111111196341 &c.

These could be CORRECT, or they could be the equivalent of
1/1
-1/3
1/5
-1/7
1/9 &c.

in which case, the
.............1
............54
...........176
..........1234
.........96341 &c.

is what I call the "Chebyshev WEDGE", because the error in the
highest-order coefficient tapers down almost to nothing at the
zero-order coefficient.

My use of HUGE MATHS was therefore to try to spot rational
(Pythagorean) relationships in the coefficients - or in a GENERATOR
FUNCTION for those coefficients. Or in the Generator-generator.

The bigger the maths, and the more coefficients used, the more likely
it is that a sequence 0.3333333 really is one THIRD, and not some
coincidence.

For example, Euler's little Gamma is 0.577215664
Pi/2e however, is 0.577863674

Three-figure maths cannot tell them apart.

Looking for natural laws, one needs these laboratory standard systems
that only the specialist ever uses.

It is nice to see this address turning up in this thread:

Greg Lovern
http://PrecisionCalc.com
Get Your Numbers Right


He won't put Gill Bates (or "what's-his-face") out of business, but
will certainly find a tiny niche market of people who want to do
unique things.

Charles Douglas Wehner