Concerning representation of algebraic numbers, it is printed as an
exact rational if and only if it is stored as an exact rational. It
will be if the method exactify has been called on the underlying
representation of the number. Here is a simple example that shows the
difference
sage: a = QQbar(2).sqrt() + QQbar(3).sqrt()
sage: b = a**2 - 2*QQbar(6).sqrt()
sage: b
5.000000000000000?
sage: type(b._descr) # b is an formal sum
<class 'sage.rings.qqbar.ANBinaryExpr'>
sage: b == 5 # calls exactify
True
sage: b # now prints as 5...
5
sage: type(b._descr) # because it *is* an exact rational
<class 'sage.rings.qqbar.ANRational'>
Vincent
> --
> You received this message because you are subscribed to the Google Groups
> "sage-support" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to
sage-support...@googlegroups.com.
> To post to this group, send email to
sage-s...@googlegroups.com.
> Visit this group at
https://groups.google.com/group/sage-support.
> For more options, visit
https://groups.google.com/d/optout.