Re: question on solutions of rational versus integer ternary quadratics

American Citizen <[email protected]>
Newsgroups gmane.comp.mathematics.pari.user
Message-ID <[email protected]>
The reason for all those solutions appearing in both Z and Q is due to a 
silly C++ programming error for the lgcd(a,b) routine when either or 
both are zero.

The correct return value for (0,a) or (a,0) is abs(a)

For (0,0) it is 1

After fixing my lgcd(a,b) routine, now the solutions correctly correspond

I apologize for this subtle error in the gcd portion of my C++ code.

Randall

On 7/14/25 13:11, American Citizen wrote:
> Hello:
>
> I am working with the following conic and 2 ternary quadratics
>
> conic =  [261/5, -3481/50, 261/5, -1739/100, -1739/100, -1]
> T9Q([x,y,z]) = 261/5*x^2 + (-3481/50*y - 1739/100*z)*x + (261/5*y^2 - 
> 1739/100*z*y - z^2)
> T9Z([x,y,z]) = 5220*x^2 + (-6962*y - 1739*z)*x + (5220*y^2 - 1739*z*y 
> - 100*z^2)
>
> Over the range of integers x,y,z, for -10,000 <= x,y,z <= 10,000 I 
> found 2367 solutions for T9Q, but only 1076 for T9Z. However the 1291 
> solutions from T9Q plugged into T9Z do work.
>
> Why is T9Q missing 1,291 solutions?
>
> Randall
>
> btw: These ternary quadratic solutions collapse to just 113 points on 
> the conic, but the [0,0] point has to be removed.
>
> Another btw note: I had special rational points on conics, it takes 2 
> rational points to successfully recover all rationals on the conic, 
> using the point-slope method to parameterize, and the reason is 
> simple, for y - y1 = m(x-x1) where [x1,y1] is known and m is the 
> slope, if you set m=0 for slope zero, the equation collapses to y - y1 
> = 0, and that only recovers your original [x1,y1] point and misses the 
> 2nd y point which IS on the conic. I had to use 2 points and only 
> found this out after laboring on this for at least 3 days wondering 
> why my rational lattice points were missing some rationals.
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.