It might be a platform dependent bug. I guess John is working on some Ubunty machine, using gcc.
Please provide compiler details you're using, too... On Fri, Sep 14, 2018 at 9:25 AM Bruno Grenet <bruno.gre...@gmail.com> wrote: > > Which version of SageMath are you using? I am unable to reproduce the > bug neither on 8.3beta7 nor on 8.4beta2. > > Bruno > > Example with 8.4beta2: > > sage: x = polygen(QQ) > sage: f = x^20 - 15*x^19 + 70989*x^18 - 1646113*x^17 + 3890074283*x^16 - > 199035549796*x^15 + 203804256639644*x^14 - 10 > ....: 657741285726487*x^13 + 9779630086245476401*x^12 - > 457685358591718595073*x^11 + 211985887298317287648516*x^10 - 1 > ....: 3621268697129972225420327*x^9 + 3065457104886066023133986949*x^8 - > 28110542105571309419720191704*x^7 + 345396659 > ....: 71867983088754678645580*x^6 - > 1061445386217881235978009629856081*x^5 + > 498395492968339432558541006017143039*x^4 > ....: - 15789239186368833250097534490638459475*x^3 + > 1774782276941552319212370439848636475557*x^2 + 446933009353599830 > ....: 6027448264353195140536*x + 4277406750726325717327241436124994515881 > ....: > sage: g = x^20 - 5*x^19 - 497395*x^18 + 43617925*x^17 + 92084825461*x^16 > - 13577322967760*x^15 - 7694013534722665*x^14 > ....: + 1430561593275815035*x^13 + 321534254513790999596*x^12 - > 70299145498412320125190*x^11 - 6894702144208513885815 > ....: 805*x^10 + 1786517983436254067840917780*x^9 + > 72426826805051978098685836211*x^8 - 243381905572083104716625046705 > ....: 20*x^7 - 255231848841911020332784180965840*x^6 + > 172908549561723112381441893500998965*x^5 - 10424385014144860101 > ....: 72621550211101919*x^4 - > 555813027721813935650430329326884907050*x^3 + > 6754721428610694790490649672796107843280*x > ....: ^2 + 470810707124413968773034018937652067163520*x + > 3896560262532181966922924457358135376686480 > ....: > sage: Kf.<a> = NumberField(f) > sage: Kg.<a> = NumberField(g) > sage: embeddings = Kf.embeddings(Kg) > sage: len(embeddings) > 2 > > > Le 13/09/2018 à 16:16, John Cremona a écrit : > > I have two polynomials of degree 20 defining the same number field (I > > obtained the second from the first using pari's polredbest() > > routine). I am able to use is_isomorphic() to find isomorphisms > > between them (there are 2) but embeddings() raises an error since > > roots() does: > > > > sage: x = polygen(QQ) > > sage: f = (x^20 - 15*x^19 + 70989*x^18 - 1646113*x^17 + > > 3890074283*x^16 - 199035549796*x^15 + 203804256639644*x^14 - > > 10657741285726487*x^13 + 9779630086245476401*x^12 - > > 457685358591718595073*x^11 + 21 > > ....: 1985887298317287648516*x^10 - 13621268697129972225420327*x^9 + > > 3065457104886066023133986949*x^8 - 28110542105571309419720191704*x^7 + > > 34539665971867983088754678645580*x^6 - 106144538621788123597 > > ....: 8009629856081*x^5 + 498395492968339432558541006017143039*x^4 - > > 15789239186368833250097534490638459475*x^3 + > > 1774782276941552319212370439848636475557*x^2 + > > 446933009353599830602744826435319514053 > > ....: 6*x + 4277406750726325717327241436124994515881) > > sage: g = (x^20 - 5*x^19 - 497395*x^18 + 43617925*x^17 + > > 92084825461*x^16 - 13577322967760*x^15 - 7694013534722665*x^14 + > > 1430561593275815035*x^13 + 321534254513790999596*x^12 - > > 7029914549841232012519 > > ....: 0*x^11 - 6894702144208513885815805*x^10 + > > 1786517983436254067840917780*x^9 + 72426826805051978098685836211*x^8 - > > 24338190557208310471662504670520*x^7 - > > 255231848841911020332784180965840*x^6 + 17 > > ....: 2908549561723112381441893500998965*x^5 - > > 1042438501414486010172621550211101919*x^4 - > > 555813027721813935650430329326884907050*x^3 + > > 6754721428610694790490649672796107843280*x^2 + 4708107071244139 > > ....: 68773034018937652067163520*x + > > 3896560262532181966922924457358135376686480) > > sage: > > sage: Kf.<a>=NumberField(f) > > sage: Kg.<a>=NumberField(g) > > sage: flag, isos = Kf.is_isomorphic(Kg, isomorphism_maps=True); flag > > True > > sage: len(isos) > > 2 > > > > but > > > > sage: Kf.embeddings(Kg) > > --------------------------------------------------------------------------- > > PariError Traceback (most recent call last) > > (...) > > PariError: inconsistent exact division t_INT , t_INT > > > > > > as a result of > > > > sage: f.roots(Kg) > > > > raising the same error. I suspect that the root-finding needs higher > > precision that it is using, but the fact that is_isomorphic() works > > fine suggests that this can be dealt with. > > > > The relevant code seems to be buried > > in sage/rings/polynomial/polynomial_element.pyx around line 4300 (!). > > I don't have tim right now to investigate further or even create a > > trac ticket. > > > > John > > -- > > 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 > > <mailto:sage-devel+unsubscr...@googlegroups.com>. > > To post to this group, send email to sage-devel@googlegroups.com > > <mailto: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. -- 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.