Re: FixedPoint
- To: mathgroup at smc.vnet.net
- Subject: [mg62232] Re: [mg62227] FixedPoint
- From: Andrzej Kozlowski <akoz at mimuw.edu.pl>
- Date: Wed, 16 Nov 2005 04:21:53 -0500 (EST)
- References: <200511160728.CAA08507@smc.vnet.net>
- Sender: owner-wri-mathgroup at wolfram.com
On 16 Nov 2005, at 16:28, Scott wrote: > Anybody know how to get FixedPoint to reveal how many iterations it > had > to perform before it found the fixed point; i.e. what n was when SameQ > was satisfied and FixedPoint exited. > > Thanks for any insight. > > Cheers, Scott > Just add your own own iterator, e.g. like this: Block[{n = 0}, {FixedPoint[(n++; (1/2)*(#1 + 2/#1)) & , 1.], n}] {1.414213562373095, 6} Andrzej Kozlowski
- References:
- FixedPoint
- From: "Scott" <sguthery@gmail.com>
- FixedPoint