Open user202729 opened 9 months ago
There is a function called algdep
in sage.arith.misc
that does essentially that. I agree that it would be nice to make it work directly on intervals (not just elements of RIF
and CIF
, but also of RBF
and CBF
) and to have a version that returns an element of QQbar
or AA
instead of the guessed minimal polynomial.
Note that one can print elements of QQbar
in a format that allows reconstuction using sage_input
.
Ah, that's nice, evidently I'm reinventing the wheel.
It was too undiscoverable for me though. For discoverability maybe...
minpoly(<RIF element>)
and minpoly(<RR element>)
raises error message suggesting to use it<RIF/RR element>.minpoly_approximate()
worksQQbar(<RIF/RBF/CIF/CBF/RR/CC element>)
works out of the box and/or raise an error message hinting to use the appropriate method.For the last point: that's true, but the format is quite unwieldy I think (preferably the printed format should be something both readable "by human" and "by computer", to allow copy pasting from terminal output to assign to new variable). (or do you have any better workflow suggestion?)
Problem Description
As in the title. I'm pretty sure this is not possible yet.
The motivation for this is that QQbar elements are printed as RIF/CIF printed form (
1.2345678?
), and it may be desirable to allow reconstructing the QQbar element from the printed form.That having said, currently
QQbar
printed form does not necessarily print enough precision to reconstruct the number:Proposed Solution
Maybe a proof-of-concept implementation (I'm not sure if it works but it seem to give reasonable output most of the time):
Alternatives Considered
-
Additional Information
No response
Is there an existing issue for this?