Ask Your Question

Revision history [back]

You can use the radical_expression method:

sage: a = AA(sqrt(3)+sqrt(2))                                                                                                                                                                                
sage: a                                                                                                                                                                                                      
3.146264369941973?
sage: a.radical_expression()                                                                                                                                                                                 
sqrt(2*sqrt(6) + 5)

Note that this is not a "complete" feature, as there might be some algebraic numbers admitting a radical decomposition that this feature will not find.