Services & Resources / Wolfram Forums
MathGroup Archive
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2005

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: FixedPoint

  • To: mathgroup at
  • Subject: [mg62242] Re: FixedPoint
  • From: "Ray Koopman" <koopman at>
  • Date: Thu, 17 Nov 2005 04:15:40 -0500 (EST)
  • References: <dlenve$8ik$>
  • Sender: owner-wri-mathgroup at

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

You can also do it without setting up an interation counter.

In[1]:= skwrt[a_] := {Last@#,Length@#-1}&@FixedPointList[.5(a/#+#)&,1.]

In[2]:= skwrt[2.]

Out[2]= {1.41421,6}

  • Prev by Date: Anyone familiar with Clearspeed?
  • Next by Date: Re: mathematica2mono
  • Previous by thread: Re: FixedPoint
  • Next by thread: Re: FixedPoint