| Henri . Cohen on Sat, 17 Dec 2016 10:21:54 +0100 |
[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]
| Re: Ratpoint |
If you have it compiled in your directory, I have this very old script which
may work (not tested in 5 years):
ratpoints(Curve,bound=1024,flags="")=
{
local(lc,infty);
lc = length(Curve);
if (lc<=1,error("The polynomial must have degree >=1"));
if (lc>=12,error("The polynomial must have degree <=10"));
Curve=concat(vector(lc,i,Str(Curve[lc+1-i]" ")));
Curve=extern(concat(["echo \\{\\[ 0; ratpoints '",Curve,"'
",bound," -q ",fla\
gs," | sed -e 's/(\\([-/0-9]\\+\\) : \\([-/0-9]\\+\\))/,[\\1 ,\\2 ]/';
echo \\\
]\\}"])); lc = length(Curve); if(lc==1 || (lc==2 && Curve[2][2]==0),return([])); infty= Curve[2][2]==0; vector(lc-1-infty,i,Curve[i+1+infty][1]/Curve[i+1+infty][2]) }