Re: FixedPoint[Cos, 1.0]

*To*: mathgroup at smc.vnet.net*Subject*: [mg119450] Re: FixedPoint[Cos, 1.0]*From*: Dana DeLouis <dana.del at gmail.com>*Date*: Sat, 4 Jun 2011 06:21:09 -0400 (EDT)

Hi. Just to mention... On your two tests that you used: FixedPoint[Cos, 1.0, SameTest -> (Abs[#1 - #2] < 10^-10 &)] FixedPoint[Cos, 1.0, 40], One of many alternatives to get a little better precision might be: FixedPoint[Cos,1.0,SameTest->(Equal[##]&)] 0.7390851332151572` Not great, but it=92s a little better. We know from other posts that the value cycles between: 0.7390851332151605` 0.7390851332151608` Another SameTest example similar to yours: FixedPoint[Cos,1.0,SameTest->(Abs[Subtract[##]]< Power[10.5,-15]&)] 0.7390851332151605` The two numbers above end in 605,and 608. Interesting is that the numbers ending in 606 and 607 stop at 607. n=0.7390851332151606` ; FixedPointList[Cos,n,10] {0.7390851332151606`,0.7390851332151607`} n=0.7390851332151607` ; FixedPointList[Cos,n,10] {0.7390851332151607`,0.7390851332151607`} The number ending in 607 seems to be the answer: Cos[0.7390851332151607`] 0.7390851332151607` Higher precision seems to indicate 607 also. FixedPoint[Cos,1`30,100]//N 0.7390851332151607` = = = = = = = = = = HTH : >) Dana DeLouis On May 31, 7:49 am, J Siehler <jsieh... at gmail.com> wrote: > My numerical analysis students this past term pointed out to me that > the command > > FixedPoint[Cos, 1.0] > > which is the first example in the Information for FixedPoint doesn't > ever finish running (or, not in any reasonable amount of time). We > tried this on serveral versions of Mathematica (6.x, 7.x, and 8.x), > all on OS X, and got the same nonresult. > > It can be forced by specifying something like FixedPoint[Cos, 1.0, > SameTest -> (Abs[#1 - #2] < 10^-10 &)] or FixedPoint[Cos, 1.0, 40], > but it seems like that should be unnecessary, and the form given in > the documentation should work. Can anybody else confirm this > behavior? Am I missing something totally obvious here?