Thomas D. Dean on Mon, 27 Nov 2023 08:22:51 +0100 |
[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]
Re: asking for a simple locally soluble algorithm for a quartic |
On 11/26/23 17:44, American Citizen wrote:
Does anyone have a simple GP-Pari script which outputs 0 for false and 1 for true when the input is a quartic in vector format: [a,b,c,d,e] where the quartic is a*x^4 + b*x^3 + c^x^2 + d^x +e and we are trying to find the everywhere_local_solubility of the quartic?Example GP Pari function: everywhere_locally_soluble(Q) = [0,1] where 0 means false and 1 means true.
look at polsturm. ? P=Pol([5, -22, 11, 19, -7]) %7 = 5*x^4 - 22*x^3 + 11*x^2 + 19*x - 7 ? polroots(P)%8 = [-0.83424318431392171711562612580235620408 + 0.E-38*I, 0.34337956895288963385776743154236596799 + 0.E-38*I, 1.4000000000000000000000000000000000000 + 0.E-38*I, 3.4908636153610320832578586942599902361 + 0.E-38*I]~
? polsturm(P) %9 = 4 ? polsturm(P-37*x+x^2) %10 = 2 ? polsturm(P-37*x+x^2+445) %11 = 0 ? #polsturm(P-37*x+x^2+445) %12 = 0 ? #polsturm(P) %13 = 1 Tom Dean