Opened 3 years ago
Last modified 3 months ago
#28827 new defect
Intermittent failures with symbolic gcd computation
Reported by: | Kwankyu Lee | Owned by: | |
---|---|---|---|
Priority: | minor | Milestone: | sage-9.8 |
Component: | symbolics | Keywords: | |
Cc: | Dave Morris, John Palmieri, Samuel Lelièvre | Merged in: | |
Authors: | Reviewers: | ||
Report Upstream: | N/A | Work issues: | |
Branch: | Commit: | ||
Dependencies: | Stopgaps: |
Description (last modified by )
On macOS, the following:
sage: gcd(x, QQbar(I))
correctly returns 1
in most Sage sessions,
but raises an error in a tenth to a third of sessions:
TypeError: unsupported operand parent(s) for +: 'Algebraic Real Field' and 'Number Field in I with defining polynomial x^2 + 1 with I = 1*I'
That issue was discussed at #28489, but covered up hastily because it was blocking Sage on Python 3.
The solution there by flagging the problematic doctests with "known bugs" is a bad solution, since the problem of the doctests is not wrong answers but intermittent failures.
This ticket would welcome a real solution. The aim is not to get correct answers for all cases in symbolic gcd computation, but to avoid uncontrolled failures.
See the discussion at #28489 and the upstream issue:
Change History (12)
comment:1 Changed 3 years ago by
Cc: | John Palmieri added |
---|
comment:2 Changed 3 years ago by
Milestone: | sage-9.0 → sage-9.1 |
---|
comment:3 Changed 3 years ago by
Milestone: | sage-9.1 → sage-9.2 |
---|
Moving tickets to milestone sage-9.2 based on a review of last modification date, branch status, and severity.
comment:4 Changed 2 years ago by
Milestone: | sage-9.2 → sage-9.3 |
---|
comment:5 Changed 21 months ago by
Cc: | Dave Morris Samuel Lelièvre added |
---|---|
Description: | modified (diff) |
comment:6 Changed 20 months ago by
Milestone: | sage-9.3 → sage-9.4 |
---|
comment:7 Changed 18 months ago by
Investigating, one finds
sage: N, i_neg, emb = QQbar(-I).as_number_field_element() sage: from sage.categories.pushout import pushout sage: pushout(AA,K) --------------------------------------------------------------------------- NotImplementedError Traceback (most recent call last) ~/sage/local/lib/python3.9/site-packages/sage/categories/pushout.py in pushout(R, S) 4190 -> 4191 return all(Z) 4192 ~/sage/local/lib/python3.9/site-packages/sage/categories/functor.pyx in sage.categories.functor.Functor.__call__ (build/cythonized/sage/categories/functor.c:3145)() 382 return self._apply_functor_to_morphism(x) --> 383 y = self._apply_functor(self._coerce_into_domain(x)) 384 if not ((y in self.__codomain) or (y in self.__codomain.Homsets())): ~/sage/local/lib/python3.9/site-packages/sage/categories/pushout.py in _apply_functor(self, R) 3164 if len(self.polys) == 1: -> 3165 return R.extension(self.polys[0], names=self.names[0], embedding=self.embeddings[0], 3166 structure=self.structures[0], prec=self.precs[0], ~/sage/local/lib/python3.9/site-packages/sage/rings/ring.pyx in sage.rings.ring.CommutativeRing.extension (build/cythonized/sage/rings/ring.c:13751)() 1519 if not (val is None or isinstance(val, list) and all(c is None for c in val)): -> 1520 raise NotImplementedError("ring extension with prescripted %s is not implemented"%key) 1521 R = self[name] NotImplementedError: ring extension with prescripted embedding is not implemented During handling of the above exception, another exception occurred: CoercionException Traceback (most recent call last) <ipython-input-84-de427d8f7020> in <module> ----> 1 pushout(AA,K) ~/sage/local/lib/python3.9/site-packages/sage/categories/pushout.py in pushout(R, S) 4197 # make sense, and in this case simply want to return that a pushout 4198 # couldn't be found. -> 4199 raise CoercionException(ex) 4200 4201 CoercionException: ring extension with prescripted embedding is not implemented
comment:9 Changed 16 months ago by
Milestone: | sage-9.4 → sage-9.5 |
---|
comment:10 Changed 12 months ago by
Milestone: | sage-9.5 → sage-9.6 |
---|
comment:11 Changed 7 months ago by
Milestone: | sage-9.6 → sage-9.7 |
---|
comment:12 Changed 3 months ago by
Milestone: | sage-9.7 → sage-9.8 |
---|
Ticket retargeted after milestone closed