You should say that this coercion is only being proposed when nf is a *real quadratic field*! For a general number field F one can get F.embeddings(RR) (or variants with RR replaced by a RealField of any precision, for example, or CC, or...). Why can that not be used for this coercion?
Personally I would never want this anyway since I would always want to specify exactly which real embedding I wanted. What sort of use case do you have in mind? John On Thu, 20 Dec 2018 at 16:15, Vincent Delecroix <20100.delecr...@gmail.com> wrote: > Dear all, > > At #26925 I failed to make a more direct coercion nf -> RR. What > we have now go through nf -> AA -> RLF -> RR and is dramatically slow. > The coercion path can be analyzed via > > sage: K.<a> = NumberField(x^2 - x - 1, embedding=(1+AA(5).sqrt())/2) > sage: cm = get_coercion_model() > sage: cm.explain(K, RR) > > The real field RR declares "_mpfr_" as being a conversion method > in its constructor. However, the coercion model does prefer a > composite map with 2 intermediates rather than this direct > conversion method... > > 1) Would it be desirable that a direct named conversion such as _mpfr_ > would be preferred than a coercion through intermediate? > > 2) Is there a way to tell Sage that I want this specific coercion to > go through the _mpfr_ method? > > Any input appreciated. > > 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 sage-devel+unsubscr...@googlegroups.com. > To post to this group, send email to sage-devel@googlegroups.com. > Visit this group at https://groups.google.com/group/sage-devel. > For more options, visit https://groups.google.com/d/optout. > -- 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 sage-devel+unsubscr...@googlegroups.com. To post to this group, send email to sage-devel@googlegroups.com. Visit this group at https://groups.google.com/group/sage-devel. For more options, visit https://groups.google.com/d/optout.