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

diophantine returns permutations when permute=False #18504

Open
smichr opened this issue Jan 28, 2020 · 1 comment
Open

diophantine returns permutations when permute=False #18504

smichr opened this issue Jan 28, 2020 · 1 comment

Comments

@smichr
Copy link
Member

smichr commented Jan 28, 2020

For binary_quadratic types, permutations of the solution are returned. This feature may apply to other types, too:

>>> diophantine(x**2+y**2-15**2)
{(-12, -9), (9, -12), (0, 15), (-15, 0), (15, 0), (-9, -12), (0, -15), (-12, 9),
 (-9, 12), (12, -9), (12, 9), (9, 12)}

It seems like only the base solution should be returned in this case and the permutations when permute=True:

>>> set([tuple(sorted([abs(i) for i in i])) for i in _])
{(0, 15), (9, 12)}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants