Re: why no result & no error from this recursion

*To*: mathgroup at smc.vnet.net*Subject*: [mg82510] Re: why no result & no error from this recursion*From*: David Bailey <dave at Remove_Thisdbailey.co.uk>*Date*: Tue, 23 Oct 2007 05:27:53 -0400 (EDT)*References*: <200710190904.FAA05304@smc.vnet.net> <DB2B10DE-2D39-482A-ACA4-6DDB5CECB1E4@jeol.com> <ffcjkc$sbg$1@smc.vnet.net>

Murray Eisenberg wrote: > When the evaluation ended (very quickly, and with no result), the front > end was immediately ready for the next input I typed. > > Sseziwa Mukasa wrote: >> On Oct 19, 2007, at 5:04 AM, Murray Eisenberg wrote: >> >>> Why does the following recursion produce neither a result nor an error >>> message -- nor a system crash? >>> >>> Block[{$RecursionLimit=50002}, (If[#<1, "", "." <> #0[# - 1]] &)[50000]] >>> >>> I even tried setting $RecursionLimit=Infinity, but no change. >>> >>> I presume this is just bumping up against a hardware/OS limit, so I'm >>> surprised to get no error message and no crash. >> My guess is that the front end is having problems formatting 50000 '.' >> for display. I've noticed sometimes that calculations that generate >> long strings on output can appear to have hung but the kernel has not >> crashed and the front end is unresponsive. >> >> Regards, >> >> Ssezi >> > Hi Murray, No it can't be the front end, because this blows up too: f[Block[{$RecursionLimit = 50002}, (If[# < 1, "", "." <> #0[# - 1]] &)[43621]];] Note that 43620 is the highest argument that works as expected. David Bailey http://www.dbaileyconsultancy.co.uk

**References**:**why no result & no error from this recursion***From:*Murray Eisenberg <murray@math.umass.edu>