f



Mac FixedPoint[] problem looks like SameQ[] is culprit

If this has already been covered, I apologize for the redundancy.  I was playing with the problem with a Mac and PC side by side.  The first test was to limit the iterations to see if the algorithm was working at all by running the following on the Mac.

m=Table[FixedPoint[Cos,1.1,x],{x,75,85}]
Table[{i+74,m[[i]]==m[[i+1]]},{i,1,Length[m]-1}]

{0.739085,0.739085,0.739085,0.739085,0.739085,0.739085,0.739085,0.739085,0.739085,0.739085,0.739085}

{{75,False},{76,False},{77,False},{78,False},{79,False},{80,False},{81,True},{82,True},{83,True},{84,True}}

This was the same on the PC.  So it appeared the algorithm worked if I killed at iteration X.  I started playing with the verification that is used to determine whether to re-apply the function. 

FixedPoint[Cos,1.1,SameTest-> (#1 == #2&)]
0.739085

FixedPoint[Cos,1.1,SameTest->(Abs[#1-#2]<1*^-10&)]
0.739085

FixedPoint[Cos,1.1,SameTest->(Equal[#1,#2]&)]
0.739085

FixedPoint[Cos,1.1,SameTest->(SameQ[#1,#2]&)]
$Aborted

My conclusion is SameQ has some issue.  Anyone think this is correct?  BTW, all work on the PC.

Thanks,
Paul


Paul McHale  |  Electrical Engineer, Energetics Systems  |  Excelitas Technologies Corp.

Phone:   +1 937.865.3004   |   Fax:  +1 937.865.5170   |   Mobile:   +1 937.371.2828
1100 Vanguard Blvd, Miamisburg, Ohio 45342-0312 USA
Paul.McHale@Excelitas.com
www.excelitas.com



Please consider the environment before printing this e-mail.
This email message and any attachments are confidential and proprietary to 
Excelitas Technologies Corp. If you are not the intended recipient of this 
message, please inform the sender by replying to this email or sending a 
message to the sender and destroy the message and any attachments.
Thank you


0
6/8/2011 11:15:33 AM
comp.soft-sys.math.mathematica 28821 articles. 0 followers. Follow

1 Replies
244 Views

Similar Articles

[PageSpeed] 57

On 6/8/2011 4:15 AM, McHale, Paul wrote:

>
> FixedPoint[Cos,1.1,SameTest->(SameQ[#1,#2]&)]
> $Aborted
>
> My conclusion is SameQ has some issue.  Anyone think this is correct?
>BTW, all work on the PC.
>

on windows 7, Mathematica 8.0.1, I get

In[3]:= FixedPoint[Cos,1.1,SameTest->(SameQ[#1,#2]&)]

Out[3]= 0.7390851332151607

--Nasser

0
Nasser
6/9/2011 9:46:09 AM
Reply: