Hi David, thanks for your reply!

I was wondering if there is a way to automatically get the desired
embedding into AA. If I do:

sage: Q=NumberField(x^2-2,'x',embedding=1.41)
sage: x=Q.gen()
sage: float(x)
1.4142135623730949

Then, I've made a field with an embedding, so really there should only
be one way to embed this into AA, as this way has already been chosen.
However, we still get two ways:

sage: Q.embeddings(AA)
[
Ring morphism:
  From: Number Field in x with defining polynomial x^2 - 2
  To:   Algebraic Real Field
  Defn: x |--> -1.414213562373095?,
Ring morphism:
  From: Number Field in x with defining polynomial x^2 - 2
  To:   Algebraic Real Field
  Defn: x |--> 1.414213562373095?
]

How can I programmatically chose the right one?

It does seem to me that I can't be the only one to expect that
sorted(...) will work on lists where the members all belong to fields
with embeddings... Currently, not only does this not work, but no
error message is produced.... Do you think it is worth me making a
ticket for this?

Emil

-- 
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to 
sage-support+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sage-support
URL: http://www.sagemath.org

Reply via email to