🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: alt.folklore.computers
Article #623797

Re: The dictionary definition of recursion

#623797
From: J. Clarke
Date: Tue, 05 Jun 2018 02:06
38 lines
2614 bytes
On Mon, 04 Jun 2018 21:49:00 -0400, J. Clarke
<jclarke...@gmail.com> wrote:

>On Mon, 4 Jun 2018 14:37:36 -0700 (PDT), gloga...@gmail.com wrote:
>
>>On Monday, June 4, 2018 at 10:16:15 AM UTC-6, Gareth's Downstairs Computer wrote:
>>> Recursion : see  recursion.
>>> 
>>> As a recursive "elegant" solution,
>>> 
>>> factorial (1,000,000) is likely to
>>> crash most systems
>>
>>Please name one such system.
>
>Ran VBA out of stack space.
>
>Ran Python out of stack space
>
>APL overflowed
>
>c++ ran it once I increased the stack size to a gigabyte but the
>result was "inf".
>
>c# with the BigInteger assembly and a gigabyte stack seems to be
>managing it but it's slow going.  It only seems to be hitting half of
>the core it's on--don't know what's going on there.

Noting that the above were all implemented with some version of:

fact(x){
	if x = 0 or x= 1 then return 1 
	else return x * fact(x-1)
}

That the optimized functions included in system libraries do factorial
efficiently doesn't have any relevance to the issue of whether a
recursive solution will complete and not crash.
Technical Details
Message-ID: <jqrbhdd0i6o7mlhsuerak35scut6gdkd2p@4ax.com>
Path: mbox-mo1.pugleaf.net!d26-v6ni2276wmb.0!nntp.google.com!feeder1-2.proxad.net!proxad.net!feeder1-1.proxad.net!ecngs!feeder2.ecngs.de!87.79.20.102.MISMATCH!newsreader5.netcologne.de!news.netcologne.de!peer01.ams1!peer.ams1.xlned.com!news.xlned.com!peer01.am4!peer.am4.highwinds-media.com!peer01.iad!feed-me.highwinds-media.com!news.highwinds-media.com!post01.iad!fx02.iad.POSTED!not-for-mail
References: <pf3oke$hq8$1@dont-email.me> <a50ca27b-e56e-4b7f-b365-637c299866e9@googlegroups.com> <pqjbhd5l8uats7rrgmci77r33vmvssnlu7@4ax.com>

Show Full Headers
Complete Article Headers
X-Received: by 2002:adf:9cc8:: with SMTP id h8-v6mr908289wre.7.1528164392679;        Mon, 04 Jun 2018 19:06:32 -0700 (PDT)
X-BeenThere: alt.folklore.computers@googlegroups.com
Received: by 2002:a1c:ca07:: with SMTP id a7-v6ls337613wmg.9.gmail; Mon, 04 Jun 2018 19:06:31 -0700 (PDT)
X-Received: by 2002:a1c:d7c1:: with SMTP id o184-v6mr1787405wmg.22.1528164391900;        Mon, 04 Jun 2018 19:06:31 -0700 (PDT)
Path: mbox-mo1.pugleaf.net!d26-v6ni2276wmb.0!nntp.google.com!feeder1-2.proxad.net!proxad.net!feeder1-1.proxad.net!ecngs!feeder2.ecngs.de!87.79.20.102.MISMATCH!newsreader5.netcologne.de!news.netcologne.de!peer01.ams1!peer.ams1.xlned.com!news.xlned.com!peer01.am4!peer.am4.highwinds-media.com!peer01.iad!feed-me.highwinds-media.com!news.highwinds-media.com!post01.iad!fx02.iad.POSTED!not-for-mail
From: J. Clarke <jclarke...@gmail.com>
Newsgroups: alt.folklore.computers
Subject: Re: The dictionary definition of recursion
Message-ID: <jqrbhdd0i6o7mlhsuerak35scut6gdkd2p@4ax.com>
References: <pf3oke$hq8$1@dont-email.me> <a50ca27b-e56e-4b7f-b365-637c299866e9@googlegroups.com> <pqjbhd5l8uats7rrgmci77r33vmvssnlu7@4ax.com>
User-Agent: ForteAgent/8.00.32.1272
MIME-Version: 1.0
Lines: 38
X-Complaints-To: ab...@newsdemon.com
NNTP-Posting-Date: Tue, 05 Jun 2018 02:06:31 UTC
Organization: http://www.NewsDemon.com
Date: Mon, 04 Jun 2018 22:06:28 -0400
X-Received-Bytes: 1966
X-Received-Body-CRC: 572315142
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit