On Aug 8, 2007, at 4:28 AM, John Cremona wrote:

> I am using the simon_two_descent() method for EllipticCurve(), and
> have some curves where the default pari precision is in sufficient,
> for example
>
>
> e=EllipticCurve([0,0,0,-10164,409444]);
> e.simon_two_descent()
>
> fails withe the (gp) run-time error "  *** bnfsunit: precision too low
> in get_arch."
>
> Now in a normal gp session I can fix this after either
> \p56
> or
> default(realprecision, 56)
>
> but when running in sage, doing
> pari.set_real_precision(120)
> seems to have no effect.
>
> I guess this is because the latter call effects the precision of the
> pari library functions, whereas simon_two_descent() is a gp script.

Yes, this is correct. Gp scripts run in their own "clean" session of  
pari so that previous commands/etc. won't (adversely or not) affect  
their behavior.

> If this is the case, and there is no better method, I guess we could
> add an extra input parameter "prec" to the simon_two_descent()
> function and then in that function call default(realprecision,prec).
> The default would be 28.

Sounds good to me.

> I should be capable of doing this myself!  But

That would be great.

> (1) I'm not sure which file to edit: looks like
> /home/jec/sage-2.7/devel/sage-main/build/sage/schemes/ 
> elliptic_curves/gp_simon.py
> but there is at least one other clone of that file;

This is the one, where was the other one you were looking at?

> (2) What should I do then to rebuild sage and test it?

sage -b rebuilds. To add a test to the doctests, add an example  
(preferably one that you fixed) to the area surrounded by triple  
quotes at the top of the relevant function. This example will then be  
tested before every release of SAGE to make sure it still works  
correctly.

> (3) When I am happy that it works, exactly what should I do to upload
> the change to that it gets incorporated into sage?

SAGE uses the mercurial revision control system. http:// 
www.selenic.com/mercurial/wiki/ When you are happy with your changes,  
you can (from the sage prompt) type

sage: hg_sage.commit()

which will bring up an editor where you comment on your changes, then  
it will check them in. To send those changes to someone else (e.g.  
William) do

sage: hg_sage.bundle(name_of_file)

and send the resulting .hg file via email. There are lots of other  
commands, e.g. hg_sage.diff() to see what you changed, etc.

This should be enough to get you going, but I would reccoment taking  
a look at http://modular.math.washington.edu/sage/doc/html/prog/ 
prog.html , specifically section 7.

> If this is documented, someone please point me in the right direction.
>  By the way, whoever it was who did the "SAGE search" thing deserves a
> prize -- it is permanently in my firefox top right corner and is how I
> look up anything about SAGE now!
>
> John
>
> PS I also have some fixes for the mwrank C++ code which I should
> upload, so the answers to my questions above should ideally answer
> that too.
>
>
> -- 
> John Cremona
>
> 

--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to sage-devel@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://sage.scipy.org/sage/ and http://modular.math.washington.edu/sage/
-~----------~----~----~----~------~----~------~--~---

Reply via email to