Post Reply 
Mini-challenge - accurate factorials
07-08-2023, 05:43 PM (This post was last modified: 07-08-2023 05:48 PM by John Keith.)
Post: #5
RE: Mini-challenge - accurate factorials
Code:

Mild spoilers...
.
.
.
.
.
.
.
.
.
.
[url=https://oeis.org/A034886]A034886[/url]- Number of digits in n!.

[url=https://oeis.org/A004154]A004154[/url]- Omit trailing zeros from factorial numbers.

There are formulas to compute these values but for the small numbers we are concerned with it is easier to just look them up. :)

As an aside, the HP 49 and 50 in Exact mode will give the exact value for n! limited only by the number of digits that will fit in memory. For the 49G+ and 50, the program FFAC is substantially faster than the built-in factorial function. On my HP 50, 1000! (2568 digits) takes about 29 seconds, whereas 1000 FFAC takes about 380 milliseconds.
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: Mini-challenge - accurate factorials - John Keith - 07-08-2023 05:43 PM



User(s) browsing this thread: 1 Guest(s)