Re: Learning recursion with hailstone seqence
- From: "Maarten Wiltink" <maarten@xxxxxxxxxxxxxxxxxx>
- Date: Fri, 17 Nov 2006 17:05:24 +0100
<alanglloyd@xxxxxxx> wrote in message
news:1163758447.067591.220960@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
On Nov 17, 9:13 am, "Maarten Wiltink" <maar...@xxxxxxxxxxxxxxxxxx>
wrote:
As an aside, I can confidently predict that for 2^1000, the return
value of the above function is 2^999 after recursing exactly 999 times.
I'm no mathematician (although I'm happy with numbers), but after
doing a quick check of values up to 50 I could also predict that.
That statement had very little to do with behaviour for values up to 50,
and everything with the very special structure of the value 2^1000 (in
combination with the definition of the function), and the fact that the
OP forgot to assign the recursed value to Result.
Groetjes,
Maarten Wiltink
.
- References:
- Learning recursion with hailstone seqence
- From: DAVID B MORGAN
- Re: Learning recursion with hailstone seqence
- From: Maarten Wiltink
- Re: Learning recursion with hailstone seqence
- From: alanglloyd@xxxxxxx
- Learning recursion with hailstone seqence
- Prev by Date: Re: Learning recursion with hailstone seqence
- Next by Date: Re: Learning recursion with hailstone seqence
- Previous by thread: Re: Learning recursion with hailstone seqence
- Next by thread: Re: Learning recursion with hailstone seqence
- Index(es):