Software associated to the paper Computing the endomorphism ring of an elliptic curve over a number field, by John E. Cremona and Andrew V. Sutherland
This repository includes sample implementations of Algorithm 1 and Algorithm 2 described in the paper in the following computer algebra systems
- Magma: see the file cmdisc.m, tested on Magma version 2.27-7
- Pari/GP: see the file cmdisc.gp, tested on Pari/GP version 2.15.2
- SageMath: see the file cmdisc.py, tested on SageMath version 9.7
These are unoptimized implementations that incorporate some but not all of the implementation suggestions noted in Remarks in the paper (see the individual source files for details).
All three implementations include a function CMProfile
that can be used to compare the performance of the implementations. This function was used to generate the timings for Algorithms 2 that are listed in Table 1 of the paper using median discriminants taken from the file cmdiscs1000.txt, which contains a list of discriminants
Also included are files used to profile the distributed implementations in Magma and SageMath:
- Magma: see the file magma_cm.m, tested on Magma version 2.27-7
- SageMath: see the file sage_cm.py, tested on SageMath version 9.7
Each includes a function TestCMDiscriminant
that can be used to generate the timings listed in the final two columns of Table 1 of the paper.