Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.soft-sys.math.mathematica > #2883 > unrolled thread
| Started by | Bob Hanlon <hanlonr@cox.net> |
|---|---|
| First post | 2011-06-01 11:34 +0000 |
| Last post | 2011-06-02 11:15 +0000 |
| Articles | 2 — 2 participants |
Back to article view | Back to comp.soft-sys.math.mathematica
Re: FixedPoint[Cos, 1.0] Bob Hanlon <hanlonr@cox.net> - 2011-06-01 11:34 +0000
Re: FixedPoint[Cos, 1.0] magma <maderri2@gmail.com> - 2011-06-02 11:15 +0000
| From | Bob Hanlon <hanlonr@cox.net> |
|---|---|
| Date | 2011-06-01 11:34 +0000 |
| Subject | Re: FixedPoint[Cos, 1.0] |
| Message-ID | <is5841$dlu$1@smc.vnet.net> |
What you meant was
Length@Union@Take[FixedPointList[Cos, 1.0, 1000], -10]
2
i.e., oscillating between two values.
Take[FixedPointList[Cos, 1.0, 1000], -3] // InputForm
{0.7390851332151608, 0.7390851332151605, 0.7390851332151608}
$Version
"8.0 for Mac OS X x86 (64-bit) (February 23, 2011)"
Bob Hanlon
---- "Szabolcs Horv=C3=A1t" <szhorvat@gmail.com> wrote:
=============
On 2011.05.31. 13:49, J Siehler 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?
>
On Windows / Pentium M it finishes if I pass a machine number (1.0) to
it. It does not finish if I pass it a number with fixed precision (e.g.
1.0`10) because the Precision of the result keeps increasing with
successive applications of Cos.
I'm curious, on your machine will the function keep oscillating between
two values? What (and how many) values do you get if you do e.g.
Union@Take[Length@FixedPointList[Cos, 1.0, 1000], -10]
?
-- Szabolcs
[toc] | [next] | [standalone]
| From | magma <maderri2@gmail.com> |
|---|---|
| Date | 2011-06-02 11:15 +0000 |
| Message-ID | <is7rd6$rf0$1@smc.vnet.net> |
| In reply to | #2883 |
> > 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). In version 8.0.1.0 February 24 2011 (32 bits) under Windows 1- this particular example is no longer present in the Information page of FixedPoint 2- FixedPoint[Cos, 1.0] works well, returning 0.739085 right away. In version 7 under Windows it also works well. So we can conclude that this is an issue linked to Mac OS X
[toc] | [prev] | [standalone]
Back to top | Article view | comp.soft-sys.math.mathematica
csiph-web