Commit 5e2704a
committed
Fix CIF sorting by forcing key=repr.
It turns out sorting in `ComplexIntervalField` is broken. In this case,
there are two elements that do not compare.
```
sage: x = PolynomialRing(CBF, 'x').gen()
sage: _, a, b, _ = sorted((x^4 - 3).roots(ComplexIntervalField(100),
multiplicities=False))
sage: a == b
False
sage: a < b
False
sage: a > b
False
sage: sorted([a,b])
[0.?e-37 + 1.31607401295249246081921890180?*I,
0.?e-37 - 1.31607401295249246081921890180?*I]
sage: sorted([b,a])
[0.?e-37 - 1.31607401295249246081921890180?*I,
0.?e-37 + 1.31607401295249246081921890180?*I]
```1 parent 33ec04b commit 5e2704a
1 file changed
+4
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
801 | 801 | | |
802 | 802 | | |
803 | 803 | | |
804 | | - | |
805 | | - | |
| 804 | + | |
| 805 | + | |
| 806 | + | |
806 | 807 | | |
807 | 808 | | |
808 | | - | |
| 809 | + | |
809 | 810 | | |
810 | 811 | | |
811 | 812 | | |
| |||
0 commit comments