Hi,

I am working with number fields that I consider as subfields of RR. I
want (relatively fast) exact computations and at the same time being
able to compare elements for the order induced by RR (see for example
#13123 going in that direction). These fields are naturally embedded
in AA but it seems impossible to do the conversion

{{{
sage: K2.<sqrt2> = NumberField(x^2 - 2, embedding=1.4142)
sage: AA(sqrt2)
Traceback (most recent call last):
...
TypeError: Illegal initializer for algebraic number
sage: QQbar(sqrt2)
Traceback (most recent call last):
...
TypeError: Illegal initializer for algebraic number
}}}

Did I do something wrong ?

In the future, I am not sure how to implement things as a number field
might be embedded in RR but also in p-adics. What do you think about a
dedicated class RealNumberField that for sure would inherit from
NumberField ? A dedicated class makes sense since you do not ask the
same question to a real number (floor, is_positive, etc) and a p-adic
one (valuation, etc).

Best,
Vincent

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to