MathGroup Archive 2005

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

Search the Archive

Re: FixedPoint stops "when elements no longer change"?


Hi Steven,
to see all decimal places you could say:

NumberForm[#, 17] & /@ FixedPointList[Cos, 1.0]

Daniel

Steven T. Hatton wrote:
> This is the example in The Mathematica Book for FixedPointList:
> 
> FixedPointList[Cos, 1.0]
> 
> {1., 0.540302, 0.857553, 0.65429, 0.79348, 0.701369, 0.76396, 0.722102, \
> 0.750418, 0.731404, 0.744237, 0.735605, 0.741425, 0.737507, 0.740147, \
> 0.738369, 0.739567, 0.73876, 0.739304, 0.738938, 0.739184, 0.739018,
> 0.73913, \
> 0.739055, 0.739106, 0.739071, 0.739094, 0.739079, 0.739089, 0.739082, \
> 0.739087, 0.739084, 0.739086, 0.739085, 0.739086, 0.739085, 0.739085, \
> 0.739085, 0.739085, 0.739085, 0.739085, 0.739085, 0.739085, 0.739085, \
> 0.739085, 0.739085, 0.739085, 0.739085, 0.739085, 0.739085, 0.739085, \
> 0.739085, 0.739085, 0.739085, 0.739085, 0.739085, 0.739085, 0.739085, \
> 0.739085, 0.739085, 0.739085, 0.739085, 0.739085, 0.739085, 0.739085, \
> 0.739085, 0.739085, 0.739085, 0.739085, 0.739085, 0.739085, 0.739085, \
> 0.739085, 0.739085, 0.739085, 0.739085, 0.739085, 0.739085, 0.739085, \
> 0.739085, 0.739085, 0.739085, 0.739085, 0.739085, 0.739085, 0.739085, \
> 0.739085, 0.739085, 0.739085, 0.739085, 0.739085, 0.739085, 0.739085}
> 
> A bit of poking around showed me that this is using SameQ for SameTest.
> 
> "SameQ requires exact correspondence between expressions, except that it
> considers Real numbers equal if their difference is less than the
> uncertainty of either of them."
> 
> I guess I'm not seeing all the decimal places used to generate to list
> above.  How would I determine the precision used to determine two
> successive values are unchanged?
> 
> I tried FixedPointList[N[Cos[#], 2] &, 1.0], but that changed neither the
> display, nor the result. 


  • Prev by Date: Re: How to set up a diff equation for circuit with a diode?
  • Next by Date: Re: Sending again: Symbolizing subscripts
  • Previous by thread: Re: Extracting just the value of the variable from the result of Solve/NDSolve
  • Next by thread: FixedPoint stops "when elements no longer change"?