Bill, I tried it, but no go: Evaluation of Squint leads to an unsucessful evaluation of NSolve[q == 0,boa, WorkingPrecision -> 69] and "boa" is undefined at that point (* while inside the local variables definitions of Block *) This rather constricts my Mma 4.0 and it closes down. Does it really run ok on Mma8.0? Wouter. ----- Original Message ----- From: "Bill Gosper" <billgosper@gmail.com> To: <math-fun@mailman.xmission.com> Sent: Monday, August 22, 2011 11:45 PM Subject: Re: [math-fun] quintic solver safety recall, sin 1 (almost)
This is shameless, but seems to work: In[375]:= Squint[q_] := Block[{rts = #[[1, 2]] & /@ NSolve[q == 0, WorkingPrecision -> 69,boa], foos, S3 = Permutations[Range[3]]}, foos = InverseFourier[ rts[[#]]/Sqrt[5]]^5 & /@ (Join[{}, #] & /@ (Permutations[ Range[5]])); foos = (fifth[Together[#[[1, 2]]]] &) /@ Solve[0 == Rationalize[ Expand[Times @@ (# - Rest[foos[[Ordering[ Denominator[Rationalize[Plus @@ #, 9.^-69]] & /@ foos, 1][[1]]]]])]]]; boa = Rationalize[Plus @@ rts/5]; Evaluate[boa + foos.Select[ Exp[2*I*\[Pi]*Join[{}, #] & /@ Permutations[Range[4]]/5], MemberQ[Chop[#.foos + boa - rts], 0] &][[1]]^#] &]
In[371]:= fifth[z_] := If[Sign[z] == -1, -(-z)^(1/5), z^(1/5)]
In[377]:= Squint[-3 - 5 x^2 + x^5]