Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.forth > #13417

Re: Reverse factorial

From "Ed" <invalid@nospam.com>
Newsgroups comp.lang.forth
Subject Re: Reverse factorial
Date 2012-07-01 23:17 +1000
Organization Aioe.org NNTP Server
Message-ID <jspim5$hcn$1@speranza.aioe.org> (permalink)
References <jsj1ni$v5g$1@speranza.aioe.org> <60980105978435@frunobulax.edu>

Show all headers | View raw


Marcel Hendrix wrote:
>
> [..]
>
> FORTH> runs
> Smallest number with a factorial of at least 10^6 digits is 205023   \ 0.000 seconds elapsed.
> Smallest number with a factorial of at least 10^7 digits is 1723508   \ 0.000 seconds
> elapsed.
> Smallest number with a factorial of at least 10^8 digits is 14842907   \ 0.000 seconds
> elapsed.
> Smallest number with a factorial of at least 10^9 digits is 130202809   \ 0.000 seconds
> elapsed.
> Smallest number with a factorial of at least 10^10 digits is 1158787578   \ 0.000 seconds
> elapsed.
 > ...

I get these results using your algorithm

Smallest number with a factorial of at least 10^0 digits: 1.
Smallest number with a factorial of at least 10^1 digits: 10.
Smallest number with a factorial of at least 10^2 digits: 70.
Smallest number with a factorial of at least 10^3 digits: 450.
Smallest number with a factorial of at least 10^4 digits: 3249.
Smallest number with a factorial of at least 10^5 digits: 25206.
Smallest number with a factorial of at least 10^6 digits: 205023.

While the original (slow) routine gives

Smallest number with a factorial of at least 1.E0 digits: 1.
Smallest number with a factorial of at least 1.E1 digits: 13.
Smallest number with a factorial of at least 1.E2 digits: 70.
Smallest number with a factorial of at least 1.E3 digits: 450.
Smallest number with a factorial of at least 1.E4 digits: 3249.
Smallest number with a factorial of at least 1.E5 digits: 25206.
Smallest number with a factorial of at least 1.E6 digits: 205022.








Back to comp.lang.forth | Previous | NextPrevious in thread | Next in thread | Find similar


Thread

Reverse factorial "Ed" <invalid@nospam.com> - 2012-06-29 11:51 +1000
  Re: Reverse factorial mhx@iae.nl (Marcel Hendrix) - 2012-06-30 02:05 +0200
    Re: Reverse factorial "Ed" <invalid@nospam.com> - 2012-06-30 12:26 +1000
    Re: Reverse factorial "Ed" <invalid@nospam.com> - 2012-07-01 23:17 +1000
      Re: Reverse factorial mhx@iae.nl (Marcel Hendrix) - 2012-07-01 16:51 +0200
        Re: Reverse factorial "Ed" <invalid@nospam.com> - 2012-07-02 05:40 +1000
          Re: Reverse factorial Paul Rubin <no.email@nospam.invalid> - 2012-07-02 22:08 -0700
            Re: Reverse factorial "Ed" <invalid@nospam.com> - 2012-07-03 17:02 +1000
            Re: Reverse factorial mhx@iae.nl (Marcel Hendrix) - 2012-07-03 21:14 +0200
              Re: Reverse factorial Paul Rubin <no.email@nospam.invalid> - 2012-07-03 12:44 -0700
                Re: Reverse factorial mhx@iae.nl (Marcel Hendrix) - 2012-07-03 22:37 +0200
                Re: Reverse factorial "Ed" <invalid@nospam.com> - 2012-07-05 23:14 +1000

csiph-web