Mathematica 9 is now available
Services & Resources / Wolfram Forums / MathGroup Archive
-----

MathGroup Archive 2011

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

Search the Archive

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

  • To: mathgroup at smc.vnet.net
  • Subject: [mg119543] Mac FixedPoint[] problem looks like SameQ[] is culprit
  • From: "McHale, Paul" <Paul.McHale at excelitas.com>
  • Date: Wed, 8 Jun 2011 07:15:42 -0400 (EDT)

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 at 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



  • Prev by Date: Re: Displaying Numbers in Non-Scientific Format
  • Next by Date: Re: Using Cases or Position to Find Strings in a List of Strings
  • Previous by thread: Re: function
  • Next by thread: Re: Mac FixedPoint[] problem looks like SameQ[] is culprit