Skip to content

Commit 76b1a92

Browse files
author
Release Manager
committed
gh-37225: splitting_field: polred -> polredbest <!-- ^^^^^ Please provide a concise, informative and self-explanatory title. Don't put issue numbers in there, do this in the PR body below. For example, instead of "Fixes #1234" use "Introduce new method to calculate 1+1" --> <!-- Describe your changes here in detail --> This PR partially addresses #22165. It removes one (in `splitting_field`) of the two uses of the Pari deprecated function `polred`. The other one is less trivial to remove and should probably be discussed in the issue. <!-- Why is this change required? What problem does it solve? --> <!-- If this PR resolves an open issue, please link to it here. For example "Fixes #12345". --> <!-- If your change requires a documentation PR, please link it appropriately. --> ### 📝 Checklist <!-- Put an `x` in all the boxes that apply. --> <!-- If your change requires a documentation PR, please link it appropriately --> <!-- If you're unsure about any of these, don't hesitate to ask. We're here to help! --> <!-- Feel free to remove irrelevant items. --> - [x] The title is concise, informative, and self-explanatory. - [x] The description explains in detail what this PR is about. - [x] I have linked a relevant issue or discussion. - [ ] I have created tests covering the changes. [the code is meant to be functionally equivalent] - [x] I have updated the documentation accordingly. ### ⌛ Dependencies None <!-- List all open PRs that this PR logically depends on - #12345: short description why this is a dependency - #34567: ... --> <!-- If you're unsure about any of these, don't hesitate to ask. We're here to help! --> URL: #37225 Reported by: AurelPage Reviewer(s): Vincent Delecroix
2 parents cdd42d4 + c1d0859 commit 76b1a92

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

src/sage/rings/number_field/splitting_field.py

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ def splitting_field(poly, name, map=False, degree_multiple=None, abort_degree=No
147147
148148
- ``simplify`` -- (default: ``True``) during the algorithm, try
149149
to find a simpler defining polynomial for the intermediate
150-
number fields using PARI's ``polred()``. This usually speeds
150+
number fields using PARI's ``polredbest()``. This usually speeds
151151
up the computation but can also considerably slow it down.
152152
Try and see what works best in the given situation.
153153
@@ -549,11 +549,9 @@ def splitting_field(poly, name, map=False, degree_multiple=None, abort_degree=No
549549
# Find a simpler defining polynomial Lpol for Mpol
550550
verbose("New field before simplifying: %s" % Mpol, t)
551551
t = cputime()
552-
M = Mpol.polred(flag=3)
553-
n = len(M[0])-1
554-
Lpol = M[1][n].change_variable_name("y")
555-
LtoM = M[0][n].change_variable_name("y").Mod(Mpol.change_variable_name("y"))
556-
MtoL = LtoM.modreverse()
552+
M = Mpol.polredbest(1)
553+
Lpol = M[0].change_variable_name("y")
554+
MtoL = M[1].lift().change_variable_name("y").Mod(Lpol)
557555
else:
558556
# Lpol = Mpol
559557
Lpol = Mpol.change_variable_name("y")

0 commit comments

Comments
 (0)