Skip to content

Commit

Permalink
Trac #33057: fix incorrect doctest in solve_integer of binary quadrat…
Browse files Browse the repository at this point in the history
…ic forms

The `Q.solve_integer(n)` method of a binary quadratic form finds `x` and
`y` such that `Q(x,y) == n` (if they exist), but the doctest erroneously
checks whether `Q(x,y) == 0`.

(This error was found by a patchbot testing ticket #30999.)

URL: https://trac.sagemath.org/33057
Reported by: gh-DaveWitteMorris
Ticket author(s): Dave Morris
Reviewer(s): Lorenz Panny
  • Loading branch information
Release Manager committed Dec 28, 2021
2 parents 3273e8a + ad491f6 commit a34b980
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions build/pkgs/configure/checksums.ini
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
tarball=configure-VERSION.tar.gz
sha1=5860964905c359ad0db75952db18d07c26fd1a81
md5=80aadbd805aed4f156ceeee80baf35e0
cksum=1321993970
sha1=e0e19f665892728ed5631771c5ec306e2c994f89
md5=1b2a2b9ed33afb2cd4789cc90a4ac5f4
cksum=2948325861
2 changes: 1 addition & 1 deletion build/pkgs/configure/package-version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
614084eee1118216826031c834ec8977a898d6ce
963437b443fc09fdedf2b6f7e119a86afbb187d4
2 changes: 1 addition & 1 deletion src/sage/quadratic_forms/binary_qf.py
Original file line number Diff line number Diff line change
Expand Up @@ -1495,7 +1495,7 @@ def solve_integer(self, n):
sage: Q = BinaryQF([randrange(-10^3, 10^3) for _ in 'abc'])
sage: n = randrange(-10^9, 10^9)
sage: xy = Q.solve_integer(n)
sage: xy is None or Q(*xy) == 0
sage: xy is None or Q(*xy) == n
True
"""
n = ZZ(n)
Expand Down

0 comments on commit a34b980

Please sign in to comment.