Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

QUAD solver missing solutions for specific hyperbolic equation #31

Open
wasdmco opened this issue Nov 9, 2024 · 2 comments
Open

QUAD solver missing solutions for specific hyperbolic equation #31

wasdmco opened this issue Nov 9, 2024 · 2 comments

Comments

@wasdmco
Copy link

wasdmco commented Nov 9, 2024

I'm trying to solve 26x^2-91xy-26y^2-58x-59y-71=0
The solver (directly running the C version or running through webassembly) returns

x0 = -2
y0 = -1

with 2 recurrence equation and 2 sets of parameter:

Recursive solutions:

xn+1 = P ⁢xn + Q ⁢yn + K
yn+1 = R ⁢xn + S ⁢yn + L

where:

P = -20 959202 739850 883948 245647 530545 (32 digits)
Q = -5 566018 877141 698132 634154 763072 (31 digits)
K = -8 718342 976376 307924 004248 001090 (31 digits)
R = -5 566018 877141 698132 634154 763072 (31 digits)
S = -1 478136 669854 940484 026105 859793 (31 digits)
L = -2 315281 844744 993080 179339 614324 (31 digits)

and also:

P = -1 478136 669854 940484 026105 859793 (31 digits)
Q = 5 566018 877141 698132 634154 763072 (31 digits)
K = 3 912238 321752 930146 204026 268958 (31 digits)
R = 5 566018 877141 698132 634154 763072 (31 digits)
S = -20 959202 739850 883948 245647 530545 (32 digits)
L = -14 731785 493753 396606 824761 778100 (32 digits)

When using a different solver, I get the following results which are not found here:

x = 4611818748
y = 1224735049

and also:

x = -487959346597421219678
y = 1837442362285426324051

I tried using older version of the quad.c based solver and as far as I can see, none are finding it.
I did try with the java solver, and that one seems to find them.

I've forked your repo and created a branch where I have an html file with the output of running both quad.c and quad.java (with teach/step enabled):

According to this, it looks like the java solver does find the second solution, but apparently not the third.

@alpertron
Copy link
Owner

Thanks for sending me this error. I will analyze the code.

@alpertron
Copy link
Owner

alpertron commented Nov 11, 2024

Notice that your second solution is not independent from your first one as shown by the following PARI-GP session:

(22:12) gp > x = 4611818748
%256 = 4611818748
(22:12) gp > y = 1224735049
%257 = 1224735049
(22:12) gp > P = -1 478136 669854 940484 026105 859793
%258 = -1478136669854940484026105859793
(22:12) gp > Q = 5 566018 877141 698132 634154 763072
%259 = 5566018877141698132634154763072
(22:12) gp > K = 3 912238 321752 930146 204026 268958
%260 = 3912238321752930146204026268958
(22:12) gp > R = 5 566018 877141 698132 634154 763072
%261 = 5566018877141698132634154763072
(22:12) gp > S = -20 959202 739850 883948 245647 530545
%262 = -20959202739850883948245647530545
(22:12) gp > L = -14 731785 493753 396606 824761 778100
%263 = -14731785493753396606824761778100
(22:12) gp > P*x+Q*y+K
%264 = -487959346597421219678
(22:13) gp > R*x+S*y+L
%265 = 1837442362285426324051

Anyway, one of these solutions should be displayed by the application.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants