There is a bug in the implementation of quadratic_defect function. It persists over a number of versions of Sage. I have Sage 9.5 and 10.3 beta 4 installed, and the bug is in both versions. Here is a minimal example: Qx.<x> = QQ[] K.<t> = NumberField(x^10 - x^8 - 2*x^7 - x^6 + 2*x^5 + 2*x^4 - x^2 + 1) p = K.prime_factors(2)[0] pi = K.uniformizer(p) a = 1 + pi^3 K.quadratic_defect(a,p)
This will throw an exception TypeError: Cannot convert non-integral float to integer The problem is with the following line in the main loop of this routine: s = self(q((a - 1) / pi**w)**(1/2)) To make the code work it should be replaced with something like this: s = self( F.lift((q((a - 1) / pi**w)).sqrt()) ) Best regards, P.K. P.S. Besides, if someone decides to correct this function as explained above, I would also suggest to replace the code # compute uniformizer pi for g in p.gens(): if g.valuation(p) == 1: pi = g break with just # compute uniformizer pi pi = K.uniformizer(p) -- 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 view this discussion on the web visit https://groups.google.com/d/msgid/sage-devel/588b9e24-0131-4edf-ac2f-025d52ba7d71n%40googlegroups.com.