Re: why no result & no error from this recursion
- To: mathgroup at smc.vnet.net
- Subject: [mg82459] Re: why no result & no error from this recursion
- From: Szabolcs Horvát <szhorvat at gmail.com>
- Date: Sat, 20 Oct 2007 06:03:34 -0400 (EDT)
- References: <ff9t3q$6bp$1@smc.vnet.net>
Murray Eisenberg wrote:
> Why does the following recursion produce neither a result nor an error
> message -- nor a system crash?
Well, Mathematica should NOT crash the entire system!
>
> Block[{$RecursionLimit=50002}, (If[#<1, "", "." <> #0[# - 1]] &)[50000]]
>
> I even tried setting $RecursionLimit=Infinity, but no change.
On my system (WinXP), the kernel quits with no error message when the
stack space is exhausted. I don't know how a "crash" is defined
precisely, but the consequences of the kernel quitting unexpectedly are
the same, no matter if there is an "Application error" dialogue box, or
there isn't.
>
> I presume this is just bumping up against a hardware/OS limit, so I'm
> surprised to get no error message and no crash.
>
--
Szabolcs