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

Solve diophantine documentation guide #24051

Merged
merged 20 commits into from
Oct 25, 2022

Conversation

bertiewooster
Copy link
Contributor

References to other Issues or PRs

Brief description of what is fixed or changed

Other comments

Release Notes

  • other
    • A new, user-friendly page on solving a Diophantine equation (finding integer solutions to a polynomial equation) algebraically was added to the Guides section.

@sympy-bot
Copy link

sympy-bot commented Sep 13, 2022

Hi, I am the SymPy bot (v167). I'm here to help you write a release notes entry. Please read the guide on how to write release notes.

Your release notes are in good order.

Here is what the release notes will look like:

  • other
    • A new, user-friendly page on solving a Diophantine equation (finding integer solutions to a polynomial equation) algebraically was added to the Guides section. (#24051 by @bertiewooster)

This will be added to https://github.com/sympy/sympy/wiki/Release-Notes-for-1.12.

Click here to see the pull request description that was parsed.
<!-- Your title above should be a short description of what
was changed. Do not include the issue number in the title. -->

#### References to other Issues or PRs
<!-- If this pull request fixes an issue, write "Fixes #NNNN" in that exact
format, e.g. "Fixes #1234" (see
https://tinyurl.com/auto-closing for more information). Also, please
write a comment on that issue linking back to this pull request once it is
open. -->


#### Brief description of what is fixed or changed


#### Other comments


#### Release Notes

<!-- Write the release notes for this release below between the BEGIN and END
statements. The basic format is a bulleted list with the name of the subpackage
and the release note for this PR. For example:

* solvers
  * Added a new solver for logarithmic equations.

* functions
  * Fixed a bug with log of integers.

or if no release note(s) should be included use:

NO ENTRY

See https://github.com/sympy/sympy/wiki/Writing-Release-Notes for more
information on how to write release notes. The bot will check your release
notes automatically to see if they are formatted correctly. -->

<!-- BEGIN RELEASE NOTES -->
* other
  * A new, user-friendly page on solving a Diophantine equation (finding integer solutions to a polynomial equation) algebraically was added to the Guides section.
<!-- END RELEASE NOTES -->

Update

The release notes on the wiki have been updated.

@sympy-bot
Copy link

sympy-bot commented Sep 13, 2022

🟠

Hi, I am the SymPy bot (v167). I've noticed that some of your commits add or delete files. Since this is sometimes done unintentionally, I wanted to alert you about it.

This is an experimental feature of SymPy Bot. If you have any feedback on it, please comment at sympy/sympy-bot#75.

The following commits add new files:

  • 126ca5b:
    • doc/src/guides/solving/solve-diophantine-equation.md

If these files were added/deleted on purpose, you can ignore this message.

@github-actions
Copy link

github-actions bot commented Sep 13, 2022

Benchmark results from GitHub Actions

Lower numbers are good, higher numbers are bad. A ratio less than 1
means a speed up and greater than 1 means a slowdown. Green lines
beginning with + are slowdowns (the PR is slower then master or
master is slower than the previous release). Red lines beginning
with - are speedups.

Significantly changed benchmark results (PR vs master)

Significantly changed benchmark results (master vs previous release)

       before           after         ratio
     [41d90958]       [c79d74da]
     <sympy-1.11.1^0>                 
-         995±4μs          623±2μs     0.63  solve.TimeSparseSystem.time_linear_eq_to_matrix(10)
-        2.84±0ms         1.16±0ms     0.41  solve.TimeSparseSystem.time_linear_eq_to_matrix(20)
-     5.67±0.02ms         1.70±0ms     0.30  solve.TimeSparseSystem.time_linear_eq_to_matrix(30)

Full benchmark results can be found as artifacts in GitHub Actions
(click on checks at the top of the PR).

@bertiewooster
Copy link
Contributor Author

For some reason unrelated to this pull request I believe, optional-dependencies (pypy-3.8, false) and optional-dependencies (3.11.0-alpha - 3.11, true) give errors on the same file:
FileNotFoundError: [Errno 2] No such file or directory: '/opt/hostedtoolcache/PyPy/3.8.13/x64/lib/pypy3.8/site-packages/aesara/tensor/c_code/dimshuffle.c'
FileNotFoundError: [Errno 2] No such file or directory: '/opt/hostedtoolcache/Python/3.11.0-rc.2/x64/lib/python3.11/site-packages/aesara/tensor/c_code/dimshuffle.c'

@bertiewooster bertiewooster marked this pull request as ready for review October 1, 2022 19:41
@bertiewooster bertiewooster marked this pull request as draft October 7, 2022 17:30
@asmeurer
Copy link
Member

asmeurer commented Oct 7, 2022

I wonder if we should try to make the example blocks more self-contained here. Each block here cannot be copied and run on its own because it depends on variables defined in earlier blocks (like solutions_list, pythag, and so on). I don't think this is a big issue for imports and symbol definitions, but for other variables it might be harder to follow. I didn't check the other guides to see if this is something to consider there too.

@bertiewooster
Copy link
Contributor Author

I wonder if we should try to make the example blocks more self-contained here. Each block here cannot be copied and run on its own because it depends on variables defined in earlier blocks (like solutions_list, pythag, and so on). I don't think this is a big issue for imports and symbol definitions, but for other variables it might be harder to follow. I didn't check the other guides to see if this is something to consider there too.

I just went through and did that. At the start of this project, I mistakenly thought all code blocks had to be self-contained, so I initially made them all self-contained. When I learned that wasn't the case, I relaxed that somewhat, and initially probably did too much of that on this page. Part of the issue is that you can't include comment-only lines in code blocks (doctest fails those tests), so I thought it made more sense to break related code into separate blocks so I could include more exposition before sections of code.

@bertiewooster bertiewooster marked this pull request as ready for review October 9, 2022 01:18
@asmeurer
Copy link
Member

Part of the issue is that you can't include comment-only lines in code blocks (doctest fails those tests)

Are you sure about that? I see lots of examples from git grep '>>> #'? Unless it fails in Markdown for some reason.

@bertiewooster
Copy link
Contributor Author

bertiewooster commented Oct 12, 2022

Part of the issue is that you can't include comment-only lines in code blocks (doctest fails those tests)

Are you sure about that? I see lots of examples from git grep '>>> #'? Unless it fails in Markdown for some reason.

It seems like comment-only lines in code blocks are allowed now, for example

>>> # Comment

Either I got confused about what caused a failure, or maybe the doctest code (criteria) changed...

@sylee957 sylee957 merged commit c66a4b2 into sympy:master Oct 25, 2022
@bertiewooster bertiewooster deleted the solve-diophantine branch October 25, 2022 23:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants