Skip to content

Commit

Permalink
sagemathgh-38479: Choose special name to avoid '@c' by singular's abs…
Browse files Browse the repository at this point in the history
…Factorize

    
<!-- ^ Please provide a concise and informative title. -->
<!-- ^ Don't put issue numbers in the title, do this in the PR
description below. -->
<!-- ^ For example, instead of "Fixes sagemath#12345" use "Introduce new method
to calculate 1 + 2". -->
<!-- v Describe your changes below in detail. -->
<!-- v Why is this change required? What problem does it solve? -->
<!-- v If this PR resolves an open issue, please link to it here. For
example, "Fixes sagemath#12345". -->

Fixes sagemath#33327

### 📝 Checklist

<!-- Put an `x` in all the boxes that apply. -->

- [x] The title is concise and informative.
- [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.
- [ ] I have updated the documentation and checked the documentation
preview.

### ⌛ Dependencies

<!-- List all open PRs that this PR logically depends on. For example,
-->
<!-- - sagemath#12345: short description why this is a dependency -->
<!-- - sagemath#34567: ... -->
    
URL: sagemath#38479
Reported by: nbruin
Reviewer(s): Dima Pasechnik
  • Loading branch information
Release Manager committed Aug 9, 2024
2 parents 95a580d + 3b267f8 commit 8587c13
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion src/sage/rings/qqbar.py
Original file line number Diff line number Diff line change
Expand Up @@ -927,6 +927,15 @@ def _factor_multivariate_polynomial(self, f, proof=True):
sage: # needs sage.libs.singular
sage: AA['x','y'](1).factor() # indirect doctest
1
Test :issue:`#33327`::
sage: # needs sage.libs.singular
sage: S.<a,c> = QQbar[]
sage: p = a^2 + 7*c^2
sage: factor(p)
(a + (-2.645751311064591?*I)*c) * (a + 2.645751311064591?*I*c)
"""
from sage.interfaces.singular import singular
from sage.structure.factorization import Factorization
Expand Down Expand Up @@ -981,7 +990,7 @@ def _factor_multivariate_polynomial(self, f, proof=True):
else:
norm_f = numfield_f

R = norm_f._singular_().absFactorize()
R = norm_f._singular_().absFactorize('"SAGE_ALGEBRAIC"')

singular.setring(R)
L = singular('absolute_factors')
Expand Down

0 comments on commit 8587c13

Please sign in to comment.