Re: FixedPoint stops "when elements no longer change"?
- To: mathgroup at smc.vnet.net
- Subject: [mg62898] Re: FixedPoint stops "when elements no longer change"?
- From: "Steven T. Hatton" <hattons at globalsymmetry.com>
- Date: Thu, 8 Dec 2005 00:04:28 -0500 (EST)
- References: <dn0v44$8ge$1@smc.vnet.net> <dn36v5$318$1@smc.vnet.net>
- Sender: owner-wri-mathgroup at wolfram.com
Jean-Marc Gulliet wrote:
>
> Hi Steven,
>
> Try the following:
>
> In[16]:=
> l = FixedPointList[Cos, 1.];
>
> In[17]:=
> NumberForm[l, Floor[$MachinePrecision] + 1]
Is there any particular reason you used Floor + 1 instead of Ceiling?
This is from the commandline UI:
In[1]:= Information[$MachinePrecision]
$MachinePrecision gives the number of decimal digits of precision used for
machine-precision numbers.
Attributes[$MachinePrecision] = {Protected}
$MachinePrecision = 15.954589770191003
Interestingly, I get a different result in the FrontEnd:
$MachinePrecision=15.9546
This is the final difference from both UIs:
In[3]:= l[[-1]] - l[[-2]]
-16
Out[3]= 1.11022 10
>
> In[9]:=
> l[[-1]] - l[[-2]]
>
> Out[9]=
> 1.1102230246251565*^-16
>
> $MachineEpsilon gives the smallest machine-precision number which can be
> added to 1.0 to give a result that is distinguishable from 1.0.
>
> In[11]:=
> $MachineEpsilon
>
> Out[11]=
> 2.220446049250313*^-16
>
> In[12]:=
> l[[-1]] - l[[-2]] < $MachineEpsilon
>
> Out[12]=
> True
>
> In[18]:=
> $Version
>
> Out[18]=
> "5.2 for Microsoft Windows (June 20, 2005)"
Both the FrontEnd and the commandline give the same result for
$MachineEpsilon:
In[3]:= $MachineEpsilon
-16
Out[3]= 2.22045 10
In[4]:= $Version
Out[4]= 5.2 for Linux (June 20, 2005)
$ /usr/sbin/hwinfo --cpu
01: None 00.0: 10103 CPU
[Created at cpu.290]
Unique ID: rdCR.j8NaKXDZtZ6
Hardware Class: cpu
Arch: Intel
Vendor: "GenuineIntel"
Model: 15.2.4 "Intel(R) Pentium(R) 4 CPU 2.40GHz"
Features:
fpu,vme,de,pse,tsc,msr,pae,mce,cx8,sep,mtrr,pge,mca,cmov,pat,pse36,clflush,dts,acpi,mmx,fxsr,sse,sse2,ss,ht,tm
Clock: 2392 MHz
Cache: 512 kb
Units/Processor: 1
Config Status: cfg=no, avail=yes, need=no, active=unknown
I wonder why your numbers are different from mine. Hardware, or software?
--
The Mathematica Wiki: http://www.mathematica-users.org/
Math for Comp Sci http://www.ifi.unizh.ch/math/bmwcs/master.html
Math for the WWW: http://www.w3.org/Math/