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 2000

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

Search the Archive

Re: FixedPoint vs. FixedPointList

  • To: mathgroup at
  • Subject: [mg24442] Re: [mg24384] FixedPoint vs. FixedPointList
  • From: Otto Linsuain <linsuain+ at>
  • Date: Tue, 18 Jul 2000 00:58:42 -0400 (EDT)
  • References: <>
  • Sender: owner-wri-mathgroup at

 Thanks to all that replied, (and to those who thought about the problem
and couldn't find a solution, I thank you too for your time).

 I have gotten two solutions to the problem of counting how many times f
is applied in 

 FixedPoint[f,x], without using FixedPointList

 One solution, proposed by Bob Hanlon and Andrzej Kozlowski, is


 where counter is initialized to zero or one.

 Another solution, proposed by Fred Simons, is

 FixedPoint[f,x, SameTest :> (counter++;yourtest&)]

 I must admit that both solutions kept me confused for a while. I
believe I understand now that the reason they work is because the
expressions before the semicolon produce no output. Thanks again. Otto

  • Prev by Date: Re: fade to mauve
  • Next by Date: Re: Plotting Surfaces from data
  • Previous by thread: RE: FixedPoint vs. FixedPointList
  • Next by thread: Re: FixedPoint vs. FixedPointList