View Single Post
  #1   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

"Jerry W. Lewis" wrote in message ...

Huh? 364! = 6.87784347275582E775 which cannot be represented in double
precision. But you can get its base 10 logarithm as

=GAMMALN(364+1)/LN(10)

Jerry


I wrote:

The factorial of 364 - AS EVERYBODY KNOWS - is:

68778434727558170665560119859758980014152110328427
61579965094573671535928279708882100278906575412101
19895131900300885716731727975982739174066996381113
80472283834806453514358733364634223094358532372731
30157400036944390560551807672851497408504437122220
63339347215710551931977898157831445366638128499001
07187614208971784984648790424495130430227400674872
32548096023952876678545319718750098925530231415881
33466056154901044661283183534535046028934954645191
46982514199769387253600408194477090596739724944349
28259379407490602564339394828766015776585992771688
09125842563048132741261544896935060354832360324970
23805268456191795728613542506025326335769192545591
12463771028421986413805768882733973504000000000000
00000000000000000000000000000000000000000000000000
00000000000000000000000000 exactly.

When I constructed my high-precision maths, I used
two bytes for the "powers-of-two", and not one.

Such a specialised maths will indeed resolve the
factorials to quite high values.

My own system gave a dynamic range of ten to the
power of 9863 down to ten-to-the -9862.

That is the behaviour of a two-byte "exponent".

A double-precision mantissa has no useful effect.

Charles Douglas Wehner