Re: Weird NMinimize behaviour

*To*: mathgroup at smc.vnet.net*Subject*: [mg97570] Re: [mg97518] Weird NMinimize behaviour*From*: DrMajorBob <btreat1 at austin.rr.com>*Date*: Sun, 15 Mar 2009 05:30:30 -0500 (EST)*References*: <200903142313.SAA25117@smc.vnet.net>*Reply-to*: drmajorbob at bigfoot.com

=CF=80 ??? Post readable code. Use Edit>Copy As>Plain Text and paste into e-mail. Bobby On Sat, 14 Mar 2009 18:13:15 -0500, Filippo Miatto <miatto at gmail.com> wrote: > Dear all, > i'm working in the quantum optics group of the university of Leiden, > and i use mathematica 7 a lot. > we have both windows machines and macs. On a mac i was trying to > minimize the function > > j[s_] := Sum[F2[n1, k1, n2, k2], {n1, 0, 2 s - 1}, {k1, 0, 2 s - 1}, > {n2, 0,2s - 1}, {k2, 0, 2s - 1}] + R2[s] > > Where > R2[s_] := (1 - 1/=CF=80 Sum[(-1)^(n1 + 1) Subscript[z, n1], {n1, 1, 2 s - > 1}])^4 > > and > F2[n1_, k1_, n2_, k2_] := (-1)^(n1 + k1 + n2 + k2)/(360 =CF=80^4) (8 > =CF=80^4 - > 60 =CF=80^2 Mod[-Subscript[z, k1] + Subscript[z, n1] - Subscript[z, k2] + > Subscript[z, n2], 2 =CF=80]^2 + 60 =CF=80 Mod[-Subscript[z, k1] + > Subscript[z, > n1] - Subscript[z, k2] + Subscript[z, n2], 2 =CF=80]^3 -15 Mod[- > Subscript[z, k1] + Subscript[z, n1] - Subscript[z, k2] + Subscript[z, > n2], 2 =CF=80]^4) > > (sorry for the mess, on the screen the subscripts simply appear as > subscripts...) > > and i get certain results for s=1,2,3,4,5,etc.. > on the windows machine though, i get worse results! the version of > mathematica is the same, machineprecision value is the same, even > the .nb file is the same! (the processor is different: a dualcore2duo > on the mac and a quad core xeon on the windows machine) > The mac can work well until s=6, the windows machine can go on to > greater values, but still giving less good results. > Do you have any idea how i can solve this issue? > Thank you in advance! > Filippo= > -- DrMajorBob at bigfoot.com

**References**:**Weird NMinimize behaviour***From:*Filippo Miatto <miatto@gmail.com>