Bill Allombert on Thu, 09 May 2013 12:52:19 +0200


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Re: Extracting numbers from strings


On Wed, May 08, 2013 at 05:40:02PM +0100, Richard in Reading wrote:
> I'm using forell to search through elliptic curves and I want to extract the
> numeric value of the conductor preferably without using ellinit and
> ellglobalred which make it too slow.
> As an example, I'd like to be able to replicate the following
> 
> forell(E,1,100,print(E[1]"\t"ellglobalred(ellinit(E[2]))[1]))
> 
> 11a1    11
> 11a2    11
> 11a3    11
> 14a1    14
> 14a2    14
> 
> just by manipulating E[1] instead of dealing with E[2]. Hopefully this would be faster.

Use ellconvertname()
? ellconvertname
ellconvertname(name): convert an elliptic curve name (as found in the elldata database) from a
string to a triplet [conductor, isogeny class, index]. It will also convert a triplet back to a
curve name.

Cheers,
Bill.