Ticket #5173 (closed defect: fixed)
[with patch, positive review] Sage 3.3.a5: doctest failure in sage/rings/polynomial/polynomial_element.pyx due to print order of roots
| Reported by: | mabshoff | Owned by: | mabshoff |
|---|---|---|---|
| Priority: | blocker | Milestone: | sage-3.3 |
| Component: | doctest coverage | Keywords: | |
| Cc: | Work issues: | ||
| Report Upstream: | Reviewers: | ||
| Authors: | Merged in: | ||
| Dependencies: | Stopgaps: |
Description
Observed on cleo and iras:
sage -t -long "devel/sage/sage/rings/polynomial/polynomial_element.pyx"
**********************************************************************
File "/home/mabshoff/build-3.3.alpha5/sage-3.3.alpha5-cleo/devel/sage/sage/rings/polynomial/polynomial_element.pyx", line 3418:
sage: p.roots(ring=ComplexIntervalField(200))
Expected:
[(1.167303978261418684256045899854842180720560371525489039140082?, 1),
(-0.76488443360058472602982318770854173032899665194736756700778? -
0.35247154603172624931794709140258105439420648082424733283770?*I, 1),
(-0.76488443360058472602982318770854173032899665194736756700778? +
0.35247154603172624931794709140258105439420648082424733283770?*I, 1),
(0.18123244446987538390180023778112063996871646618462304743774? -
1.08395410131771066843034449298076657427364024315511565430114?*I, 1),
(0.18123244446987538390180023778112063996871646618462304743774? +
1.08395410131771066843034449298076657427364024315511565430114?*I, 1)]
Got:
[(1.167303978261418684256045899854842180720560371525489039140082?, 1),
(0.18123244446987538390180023778112063996871646618462304743774? -
1.08395410131771066843034449298076657427364024315511565430114?*I, 1),
(-0.76488443360058472602982318770854173032899665194736756700778? -
0.35247154603172624931794709140258105439420648082424733283770?*I, 1),
(-0.76488443360058472602982318770854173032899665194736756700778? +
0.35247154603172624931794709140258105439420648082424733283770?*I, 1),
(0.18123244446987538390180023778112063996871646618462304743774? +
1.08395410131771066843034449298076657427364024315511565430114?*I, 1)]
**********************************************************************
Attachments
Change History
comment:1 Changed 4 years ago by cwitty
- Summary changed from Sage 3.3.a5: doctest failure in sage/rings/polynomial/polynomial_element.pyx due to print order of roots to [with patch, needs review] Sage 3.3.a5: doctest failure in sage/rings/polynomial/polynomial_element.pyx due to print order of roots
The code didn't do the right thing at all with ComplexIntervalField?(200), because it was trying to compare incomparable values, so it fell back to comparing the types. Fixed in the attached patch by adding an explicit conversion to the appropriate type.
comment:2 Changed 4 years ago by mabshoff
- Summary changed from [with patch, needs review] Sage 3.3.a5: doctest failure in sage/rings/polynomial/polynomial_element.pyx due to print order of roots to [with patch, positive review] Sage 3.3.a5: doctest failure in sage/rings/polynomial/polynomial_element.pyx due to print order of roots
Positive review.
Cheers,
Michael
Note: See
TracTickets for help on using
tickets.

