Changes between Initial Version and Version 11 of Ticket #10147


Ignore:
Timestamp:
03/14/21 20:56:47 (10 months ago)
Author:
vdelecroix
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #10147

    • Property Status changed from new to needs_review
    • Property Authors changed from to Vincent Delecroix
    • Property Cc jason added
    • Property Summary changed from Inconsistent behaviour of p.roots(ring=CC) for p(x) in QQ['y']['x'] (incl. crashing) to conversions of constant polynomials
    • Property Branch changed from to u/vdelecroix/10147
    • Property Milestone changed from sage-5.11 to sage-9.4
    • Property Commit changed from to 4c7a3c3066ed34c65a22d722aa9c47e717bf6c6e
  • Ticket #10147 – Description

    initial v11  
     1Many conversions of constant polynomials fail
     2{{{
     3sage: CC(QQ['x']['y'](2/3))
     4Traceback (most recent call last):
     5...
     6TypeError: unable to coerce to a ComplexNumber:
     7<class 'sage.rings.polynomial.polynomial_element.Polynomial_generic_dense'>
     8}}}
     9As a consequence, some root computations are not available
     10{{{
     11sage: R.<x> = QQ['y'][]
     12sage: (-x+1).roots(ring=CC)
     13[(1.00000000000000, 1)]
     14sage: (-1/2*x+1).roots(ring=CC)
     15Traceback (most recent call last):
     16...
     17TypeError: unable to coerce to a ComplexNumber:
     18<class 'sage.rings.polynomial.polynomial_element.Polynomial_generic_dense'>
     19}}}
     20(this used to crash on older version of !SageMath, see below).
     21
     22----------------------------------------------------------------
     23Original report on previous version of sage
     24
    125`p.roots(ring=CC)` where `p` is an element `QQ['y']['x']` whose coefficient do not depend on `y` leads to several different errors depending on the value of p.  I guess there are in fact several distinct issues.  The final crash might be related to #9826.
    226
     
    731| Type notebook() for the GUI, and license() for information.        |
    832----------------------------------------------------------------------
    9 sage: R.<x> = QQ['y'][]
    10 sage: (-x+1).roots(ring=CC)
    11 [(1.00000000000000, 1)]
    12 sage: (-1/2*x+1).roots(ring=CC)
    1333ERROR: An unexpected error occurred while tokenizing input
    1434The following traceback may be corrupted or invalid