sagemath / sage

Main repository of SageMath
https://www.sagemath.org
Other
1.38k stars 470 forks source link

Polynomials over `RealIntervalAbsoluteField` are broken #38670

Open maxale opened 4 weeks ago

maxale commented 4 weeks ago

Steps To Reproduce

No response

Expected Behavior

RealIntervalAbsoluteField looks like a valid class for building polynomials on top of it.

Actual Behavior

However, an error appears as soon as an element of RealIntervalAbsoluteField is multiplied by the polynomial variable:

from sage.rings.real_interval_absolute import RealIntervalAbsoluteField
K = RealIntervalAbsoluteField(50)
Q.<x> = K[]
sage: x + K((2,3))
x + 3.?
sage: K((4,5))*x + K((2,3))
...skipped...
AttributeError: 'PolynomialRing_field_with_category.element_class' object has no attribute 'floor'

Additional Information

No response

Environment

Checklist

fchapoton commented 4 weeks ago

Amusingly, this works in the other sense:

sage: x*K((4,3))
4.?*x
fchapoton commented 4 weeks ago

This is questionable:


sage: x.parent().is_exact()
True