Minor bug in EllipticCurve's global_minimal_model()

19 views
Skip to first unread message

Benjamin Matschke

unread,
Jan 11, 2020, 5:49:08 AM1/11/20
to sage-support
Computing the global minimal model of an elliptic curve over a number field isomorphic to QQ...

sage: K.<t> = NumberField(x-1)
sage
: E = EllipticCurve(K,[0,2])
sage
: E.global_minimal_model()

... raises an unexpected TypeError:

TypeError: round() takes no arguments (1 given).

(Run on Sage 9.0, Linux Mint 19.2, 64 bit)
It's not dramatic as one can simply work over QQ and coerce, but I think the above code should also work and yield the same result, as sometimes it is convenient to treat QQ as an instance of NumberField.

Thanks,
Benjamin

John Cremona

unread,
Jan 11, 2020, 12:39:40 PM1/11/20
to sage-support
Yes it's a bug.  The rounding is only used when the base field has degree 1, but the test should be that it is actually QQ.  A one-line fix in line 895 of  sage/schemes/elliptic_curves/ell_number_field.py would sort this.
Reply all
Reply to author
Forward
0 new messages