Bill Allombert on Tue, 17 Jun 2003 14:53:40 +0200 |
[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]
Description system part 2 |
Hello PARI-dev, Here a patch that implement the description system. This time it is a real patch, not an install script. You need perl installed to use it. This patch do the following: --- Add a directory src/desc and a file Def that contains the definition of the PARI function. --- Add perl scripts that generate the following file: src/gp/gp_init.h src/gp/highlvl.h src/language/init.h from the database. These files are included in the corresponding C file and contains the functions list and help messages. --- make sure the above files are shipped in the tarball so that perl is not required to build PARI from a tarball, only from CVS. What need to be discussed: 1) How we name/split the src/desc/Def file 2) What we want in the Def file. Cheers, Bill.
? desc ? patch ? patch2 ? patch3 ? src/desc ? src/gp/highlvl.h Index: config/Makefile.SH =================================================================== RCS file: /home/megrez/cvsroot/pari/config/Makefile.SH,v retrieving revision 1.86 diff -u -r1.86 Makefile.SH --- config/Makefile.SH 2003/05/17 15:15:22 1.86 +++ config/Makefile.SH 2003/06/17 12:05:38 @@ -564,7 +564,8 @@ cat >> $file << EOT pariinl.h: parilvl0.h parilvl1.h cat parilvl0.h parilvl1.h > pariinl.h - +$src/gp/gp_init.h $src/gp/highlvl.h $src/language/init.h: $src/desc/Def + cd $src/desc; make EOT if test -s $src_dir/kernel/$kernlvl0/MakeLVL0.SH; then @@ -592,11 +593,18 @@ gp|gp_rl) cflags="$cflags -I$src/language \$(RLINCLUDE)" depend="$src/language/anal.h $src/gp/gp.h ./paricfg.h" + ;; + gp_init) + cflags="$cflags -I$src/graph" + depend="$src/graph/rect.h $src/gp/gp_init.h" ;; - gp_init|plotport) + plotport) cflags="$cflags -I$src/graph" depend="$src/graph/rect.h" ;; + highlvl) + depend="$src/gp/highlvl.h" + ;; plotQt) cflags="$cflags \$(PLOTCFLAGS)" depend="$src/graph/rect.h" @@ -606,8 +614,11 @@ cflags="$cflags \$(PLOTCFLAGS)" depend="$src/graph/rect.h" ;; - init|es|sumiter) + es|sumiter) depend="$src/language/anal.h" + ;; + init) + depend="$src/language/anal.h $src/language/init.h" ;; anal) depend="$src/language/anal.h $src/headers/parinf.h" Index: config/get_MANIFEST =================================================================== RCS file: /home/megrez/cvsroot/pari/config/get_MANIFEST,v retrieving revision 1.3 diff -u -r1.3 get_MANIFEST --- config/get_MANIFEST 2003/04/05 13:55:35 1.3 +++ config/get_MANIFEST 2003/06/17 12:05:38 @@ -2,3 +2,6 @@ cvs status 2>/dev/null | grep Repository | grep -v cvsignore \ | sed "s|.*$root\(.*\),v|\1|" | egrep -v "Repository|Attic" echo Odos/paricfg.h +echo src/language/init.h +echo src/gp/gp_init.h +echo src/gp/highlevel.h Index: src/gp/gp_init.c =================================================================== RCS file: /home/megrez/cvsroot/pari/src/gp/gp_init.c,v retrieving revision 1.19 diff -u -r1.19 gp_init.c --- src/gp/gp_init.c 2002/12/15 17:52:59 1.19 +++ src/gp/gp_init.c 2003/06/17 12:05:38 @@ -36,53 +36,7 @@ static void whatnow0(char *s) { whatnow(s,0); } -entree functions_gp[]={ -{"allocatemem",0,(void*)allocatemem0,11,"vD0,L,"}, -{"default",0,(void*)default0,11,"D\"\",r,D\"\",s,D0,L,"}, -{"error",0,(void*)error0,11,"vs*"}, -{"extern",1,(void*)extern0,11,"s"}, -{"input",0,(void*)input0,11,""}, -{"global",88,NULL,11,NULL}, -{"print",0,(void*)print,11,"vs*"}, -{"print1",0,(void*)print1,11,"vs*"}, -{"printp",0,(void*)printp,11,"vs*"}, -{"printp1",0,(void*)printp1,11,"vs*"}, -{"printtex",0,(void*)printtex,11,"vs*"}, -{"quit",0,(void*)gp_quit,11,"v"}, -{"read",0,(void*)read0,11,"D\"\",s,"}, -{"system",70,(void*)system0,11,"vs"}, -{"trap",0,(void*)trap0,11,"D\"\",r,DIDI"}, -{"whatnow",1,(void*)whatnow0,11,"vr"}, -{"write",99,(void*)write0,11,"vss*"}, -{"write1",99,(void*)write1,11,"vss*"}, -{"writebin",99,(void*)gpwritebin,11,"vsDG"}, -{"writetex",99,(void*)writetex,11,"vss*"}, - -{NULL,0,NULL,0,NULL} /* sentinel */ -}; - -char *helpmessages_gp[]={ - "allocatemem({s=0}): allocates a new stack of s bytes. doubles the stack if s is omitted", - "default({opt},{v},{flag}): set the default opt to v. If v is omitted, print the current default for opt. If no argument is given, print a list of all defaults as well as their values. If flag is non-zero, return the result instead of printing it on screen. See manual for details", - "error(\"msg\"): abort script with error message msg", - "extern(cmd): execute shell command cmd, and feeds the result to GP (as if loading from file)", - "input(): read an expression from the input file or standard input", - "global(x): declare x to be a global variable", - "print(a): outputs a (in raw format) ending with newline", - "print1(a): outputs a (in raw format) without ending with newline", - "printp(a): outputs a (in beautified format) ending with newline", - "printp1(a): outputs a (in beautified format) without ending with newline", - "printtex(a): outputs a in TeX format", - "quit(): quits GP and return to the system", - "read({filename}): read from the input file filename. If filename is omitted, reread last input file (be it from readfile or \\r)", - "system(a): a being a string, execute the system command a (not valid on every machine)", - "trap({err}, {rec}, {seq}): try to execute seq, trapping error err (all of them if err ommitted); sequence rec is executed if the error occurs and is the result of the command. When seq is omitted, define rec as a default handler for error err (a break loop will be started if rec omitted). If rec is the empty string \"\" pop out the last default handler", - "whatnow(fun): if f was present in GP version 1.39.15 or lower, gives the new function name", - "write(filename,a): write the string expression a (same output as print) to filename", - "write1(filename,a): write the string expression a (same output as print1) to filename", - "writebin(filename,{x}): write x as a binary object to file filename. If x is omitted, write all session variables", - "writetex(filename,a): write the string expression a (same format as print) to filename, in TeX format", -}; +#include "gp_init.h" /* Backward Compatibility */ Index: src/gp/highlvl.c =================================================================== RCS file: /home/megrez/cvsroot/pari/src/gp/highlvl.c,v retrieving revision 1.19 diff -u -r1.19 highlvl.c --- src/gp/highlvl.c 2003/04/06 14:28:07 1.19 +++ src/gp/highlvl.c 2003/06/17 12:05:38 @@ -230,81 +230,4 @@ settyp(x, t); return x; } -entree functions_highlevel[]={ -{"addhelp",99,(void*)addhelp,11,"vSs"}, -{"install",99,(void*)gpinstall,11,"vrrD\"\",r,D\"\",s,"}, -{"kill",85,(void*)kill0,11,"vS"}, -{"plot",99,(void*)plot,10,"vV=GGIDGDGp"}, -{"plotbox",35,(void*)rectbox,10,"vLGG"}, -{"plotclip",99,(void*)rectclip,10,"vL"}, -{"plotcolor",19,(void*)rectcolor,10,"vLL"}, -{"plotcopy",99,(void*)rectcopy_gen,10,"vLLGGD0,L,"}, -{"plotcursor",11,(void*)rectcursor,10,"L"}, -{"plotdraw",99,(void*)rectdraw_flag,10,"vGD0,L,"}, -{"plotfile",16,(void*)plot_outfile_set,10,"ls"}, -{"ploth",99,(void*)ploth,10,"V=GGIpD0,M,D0,L,\nParametric|1; Recursive|2; no_Rescale|4; no_X_axis|8; no_Y_axis|16; no_Frame|32; no_Lines|64; Points_too|128; Splines|256; no_X_ticks|512; no_Y_ticks|1024; Same_ticks|2048"}, -{"plothraw",25,(void*)plothraw,10,"GGD0,L,"}, -{"plothsizes",0,(void*)plothsizes_flag,10,"D0,L,"}, -{"plotinit",99,(void*)initrect_gen,10,"vLD0,G,D0,G,D0,L,"}, -{"plotkill",99,(void*)killrect,10,"vL"}, -{"plotlines",99,(void*)rectlines,10,"vLGGD0,L,"}, -{"plotlinetype",19,(void*)rectlinetype,10,"vLL"}, -{"plotmove",35,(void*)rectmove,10,"vLGG"}, -{"plotpoints",35,(void*)rectpoints,10,"vLGG"}, -{"plotpointsize",99,(void*)rectpointsize,10,"vLG"}, -{"plotpointtype",19,(void*)rectpointtype,10,"vLL"}, -{"plotrbox",35,(void*)rectrbox,10,"vLGG"}, -{"plotrecth",73,(void*)rectploth,10,"LV=GGIpD0,L,D0,L,"}, -{"plotrecthraw",45,(void*)rectplothraw,10,"LGD0,L,"}, -{"plotrline",35,(void*)rectrline,10,"vLGG"}, -{"plotrmove",35,(void*)rectrmove,10,"vLGG"}, -{"plotrpoint",35,(void*)rectrpoint,10,"vLGG"}, -{"plotscale",59,(void*)rectscale,10,"vLGGGG"}, -{"plotstring",57,(void*)rectstring3,10,"vLsD0,L,"}, -{"plotterm",16,(void*)term_set,10,"ls"}, -{"psdraw",99,(void*)postdraw_flag,10,"vGD0,L,"}, -{"psploth",99,(void*)postploth,10,"V=GGIpD0,L,D0,L,"}, -{"psplothraw",25,(void*)postplothraw,10,"GGD0,L,"}, -{"type",99,(void*)type0,11,"GD\"\",r,"}, - -{NULL,0,NULL,0,NULL} /* sentinel */ -}; - -char *helpmessages_highlevel[]={ - "addhelp(symbol,\"message\"): add/change help message for a symbol", - "install(name,code,{gpname},{lib}): load from dynamic library 'lib' the function 'name'. Assign to it the name 'gpname' in this GP session, with argument code 'code'. If 'lib' is omitted use 'libpari.so'. If 'gpname' is omitted, use 'name'", - "kill(x): kills the present value of the variable or function x. Returns new value or 0", - "plot(X=a,b,expr,{ymin},{ymax}): crude plot of expression expr, X goes from a to b, with Y ranging from ymin to ymax. If ymin (resp. ymax) is not given, the minima (resp. the maxima) of the expression is used instead", - "plotbox(w,x2,y2): if the cursor is at position (x1,y1), draw a box with diagonal (x1,y1) and (x2,y2) in rectwindow w (cursor does not move)", - "plotclip(w): clip the contents of the rectwindow to the bounding box (except strings)", - "plotcolor(w,c): in rectwindow w, set default color to c. Possible values for c are 1=black, 2=blue, 3=sienna, 4=red, 5=cornsilk, 6=grey, 7=gainsborough", - "plotcopy(sourcew,destw,dx,dy,{flag=0}): copy the contents of rectwindow sourcew to rectwindow destw with offset (dx,dy). If flag's bit 1 is set, dx and dy express fractions of the size of the current output device, otherwise dx and dy are in pixels. dx and dy are relative positions of northwest corners if other bits of flag vanish, otherwise of: 2: southwest, 4: southeast, 6: northeast corners", - "plotcursor(w): current position of cursor in rectwindow w", - "plotdraw(list, {flag=0}): draw vector of rectwindows list at indicated x,y positions; list is a vector w1,x1,y1,w2,x2,y2,etc. . If flag!=0, x1, y1 etc. express fractions of the size of the current output device", - "plotfile(filename): set the output file for plotting output. \"-\" redirects to the same place as PARI output", - "ploth(X=a,b,expr,{flags=0},{n=0}): plot of expression expr, X goes from a to b in high resolution. Both flags and n are optional. Binary digits of flags mean: 1=Parametric, 2=Recursive, 4=no_Rescale, 8=no_X_axis, 16=no_Y_axis, 32=no_Frame, 64=no_Lines (do not join points), 128=Points_too (plot both lines and points), 256=Splines (use cubic splines), 512=no_X_ticks, 1024= no_Y_ticks, 2048=Same_ticks (plot all ticks with the same length). n specifies number of reference points on the graph (0=use default value). Returns a vector for the bounding box", - "plothraw(listx,listy,{flag=0}): plot in high resolution points whose x (resp. y) coordinates are in listx (resp. listy). If flag is 1, join points, other non-0 flags should be combinations of bits 8,16,32,64,128,256 meaning the same as for ploth()", - "plothsizes({flag=0}): returns array of 6 elements: terminal width and height, sizes for ticks in horizontal and vertical directions, width and height of characters. If flag=0, sizes of ticks and characters are in pixels, otherwise are fractions of the screen size", - "plotinit(w,{x=0},{y=0},{flag=0}): initialize rectwindow w to size x,y. If flag!=0, x and y express fractions of the size of the current output device. x=0 or y=0 means use the full size of the device", - "plotkill(w): erase the rectwindow w", - "plotlines(w,listx,listy,{flag=0}): draws an open polygon in rectwindow w where listx and listy contain the x (resp. y) coordinates of the vertices. If listx and listy are both single values (i.e not vectors), draw the corresponding line (and move cursor). If (optional) flag is non-zero, close the polygon", - "plotlinetype(w,type): change the type of following lines in rectwindow w. type -2 corresponds to frames, -1 to axes, larger values may correspond to something else. w=-1 changes highlevel plotting", - "plotmove(w,x,y): move cursor to position x,y in rectwindow w", - "plotpoints(w,listx,listy): draws in rectwindow w the points whose x (resp y) coordinates are in listx (resp listy). If listx and listy are both single values (i.e not vectors), draw the corresponding point (and move cursor)", - "plotpointsize(w,size): change the \"size\" of following points in rectwindow w. w=-1 changes global value", - "plotpointtype(w,type): change the type of following points in rectwindow w. type -1 corresponds to a dot, larger values may correspond to something else. w=-1 changes highlevel plotting", - "plotrbox(w,dx,dy): if the cursor is at (x1,y1), draw a box with diagonal (x1,y1)-(x1+dx,y1+dy) in rectwindow w (cursor does not move)", - "plotrecth(w,X=xmin,xmax,expr,{flags=0},{n=0}): plot graph(s) for expr in rectwindow w, where expr is scalar for a single non-parametric plot, and a vector otherwise. If plotting is parametric, its length should be even and pairs of entries give points coordinates. If not, all entries but the first are y-coordinates. Both flags and n are optional. Binary digits of flags mean: 1 parametric plot, 2 recursive plot, 4 do not rescale w, 8 omit x-axis, 16 omit y-axis, 32 omit frame, 64 do not join points, 128 plot both lines and points. n specifies the number of reference points on the graph (0=use default value). Returns a vector for the bounding box", - "plotrecthraw(w,data,{flags=0}): plot graph(s) for data in rectwindow w, where data is a vector of vectors. If plot is parametric, length of data should be even, and pairs of entries give curves to plot. If not, first entry gives x-coordinate, and the other ones y-coordinates. Admits the same optional flags as plotrecth, save that recursive plot is meaningless", - "plotrline(w,dx,dy): if the cursor is at (x1,y1), draw a line from (x1,y1) to (x1+dx,y1+dy) (and move the cursor) in the rectwindow w", - "plotrmove(w,dx,dy): move cursor to position (dx,dy) relative to the present position in the rectwindow w", - "plotrpoint(w,dx,dy): draw a point (and move cursor) at position dx,dy relative to present position of the cursor in rectwindow w", - "plotscale(w,x1,x2,y1,y2): scale the coordinates in rectwindow w so that x goes from x1 to x2 and y from y1 to y2 (y2<y1 is allowed)", - "plotstring(w,x,{flags=0}): draw in rectwindow w the string corresponding to x. Bits 1 and 2 of flag regulate horizontal alignment: left if 0, right if 2, center if 1. Bits 4 and 8 regulate vertical alignment: bottom if 0, top if 8, v-center if 4. Can insert additional gap between point and string: horizontal if bit 16 is set, vertical if bit 32 is set", - "plotterm(\"termname\"): set terminal to plot in high resolution to. Ignored by some drivers. In gnuplot driver possible terminals are the same as in gnuplot, terminal options can be put after the terminal name and space; terminal size can be put immediately after the name, as in \"gif=300,200\". If term is \"?\", lists possible values. Positive return value means success", - "psdraw(list, {flag=0}): same as plotdraw, except that the output is a postscript program in psfile (pari.ps by default), and flag!=0 scales the plot from size of the current output device to the standard postscript plotting size", - "psploth(X=a,b,expr,{flags=0},{n=0}): same as ploth, except that the output is a postscript program in psfile (pari.ps by default)", - "psplothraw(listx,listy,{flag=0}): same as plothraw, except that the output is a postscript program in psfile (pari.ps by default)", - "type(x,{t}): if t is not present, output the type of the GEN x. Else make a copy of x with type t. Use with extreme care, usually with t = t_FRACN or t = t_RFRACN). Try \\t for a list of types", -}; - +#include "highlvl.h" Index: src/language/helpmsg.c =================================================================== RCS file: /home/megrez/cvsroot/pari/src/language/helpmsg.c,v retrieving revision 1.57 diff -u -r1.57 helpmsg.c --- src/language/helpmsg.c 2003/04/23 10:45:29 1.57 +++ src/language/helpmsg.c 2003/06/17 12:05:38 @@ -1,493 +0,0 @@ -/* $Id: helpmsg.c,v 1.57 2003/04/23 10:45:29 bill Exp $ - -Copyright (C) 2000-2003 The PARI group. - -This file is part of the PARI/GP package. - -PARI/GP is free software; you can redistribute it and/or modify it under the -terms of the GNU General Public License as published by the Free Software -Foundation. It is distributed in the hope that it will be useful, but WITHOUT -ANY WARRANTY WHATSOEVER. - -Check the License for details. You should have received a copy of it, along -with the package; see the file 'COPYING'. If not, write to the Free Software -Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ - -char *helpmessages_basic[]={ - "Euler=Euler(): Euler's constant with current precision", - "I=I(): square root of -1", - "List({x=[]}): transforms the vector or list x into a list. Empty list if x is omitted", - "Mat({x=[]}): transforms any GEN x into a matrix. Empty matrix if x is omitted", - "Mod(x,y,{flag=0}): creates the object x modulo y. flag is optional, and can be 0: default, creates on the Pari stack, or 1: creates a permanent object on the heap", - "O(a^b): p-adic or power series zero with precision given by b", - "Pi=Pi(): the constant pi, with current precision", - "Pol(x,{v=x}): convert x (usually a vector or a power series) into a polynomial with variable v, starting with the leading coefficient", - "Polrev(x,{v=x}): convert x (usually a vector or a power series) into a polynomial with variable v, starting with the constant term", - "Qfb(a,b,c,{D=0.}): binary quadratic form a*x^2+b*x*y+c*y^2. D is optional (0.0 by default) and initializes Shanks's distance if b^2-4*a*c>0", - "Ser(x,{v=x}): convert x (usually a vector) into a power series with variable v, starting with the constant coefficient", - "Set({x=[]}): convert x into a set, i.e. a row vector with strictly increasing coefficients. Empty set if x is omitted", - "Str({str}*): concatenates its (string) argument into a single string", - "Strexpand({str}*): concatenates its (string) argument into a single string, performing tilde expansion", - "Strtex({str}*): translates its (string) arguments to TeX format and returns the resulting string", - "Vec({x=[]}): transforms the object x into a vector. Used mainly if x is a polynomial or a power series. Empty vector if x is omitted", - "Vecsmall({x=[]}): transforms the object x into a VECSMALL. Empty vector if x is omitted", - "abs(x): absolute value (or modulus) of x", - "acos(x): inverse cosine of x", - "acosh(x): inverse hyperbolic cosine of x", - "addprimes({x=[]}): add primes in the vector x (with at most 100 components) to the prime table. x may also be a single integer. The \"primes\" may in fact be composite, obtained for example by the function factor(x,0), and in that case the message \"impossible inverse modulo\" will give you some factors. List the current extra primes if x is omitted. If some primes are added which divide non trivially the existing table, suitable updating is done", - "agm(x,y): arithmetic-geometric mean of x and y", - "algdep(x,n,{flag=0}): algebraic relations up to degree n of x. flag is optional, and can be 0: default, uses the algorithm of Hastad et al, or non-zero, and in that case is a number of decimal digits which should be between 0.5 and 1.0 times the number of decimal digits of accuracy of x, and uses a standard LLL", - "alias(\"new\",\"old\"): new is now an alias for old", - "arg(x): argument of x,such that -pi<arg(x)<=pi", - "asin(x): inverse sine of x", - "asinh(x): inverse hyperbolic sine of x", - "atan(x): inverse tangent of x", - "atanh(x): inverse hyperbolic tangent of x", - "bernfrac(x): Bernoulli number B_x, as a rational number", - "bernreal(x): Bernoulli number B_x, as a real number with the current precision", - "bernvec(x): Vector of rational Bernoulli numbers B_0, B_2,...up to B_(2x)", - "besselh1(nu,x): H^1-bessel function of index nu and argument x", - "besselh2(nu,x): H^2-bessel function of index nu and argument x", - "besseli(nu,x): I-bessel function of index nu and argument x", - "besselj(nu,x): J-bessel function of index nu and argument x", - "besseljh(n,x): J-bessel function of index n+1/2 and argument x, where n is a non-negative integer", - "besselk(nu,x,{flag=0}): K-bessel function of index nu and argument x (x positive real of type real, nu of any scalar type). flag is optional, and may be set to 0: default; 1: use hyperu", - "besseln(nu,x): N-bessel function of index nu and argument x", - "bestappr(x,k): gives the best approximation to the real x with denominator less or equal to k", - "bezout(x,y): gives a 3-dimensional row vector [u,v,d] such that d=gcd(x,y) and u*x+v*y=d", - "bezoutres(x,y): gives a 3-dimensional row vector [u,v,d] such that d=resultant(x,y) and u*x+v*y=d, where x and y are polynomials", - "bigomega(x): number of prime divisors of x, counted with multiplicity", - "binary(x): gives the vector formed by the binary digits of x (x integer)", - "binomial(x,y): binomial coefficient x*(x-1)...*(x-y+1)/y! defined for y in Z and any x", - "bitand(x,y): bitwise \"and\" of two integers x and y. Negative numbers behave as if modulo big power of 2", - "bitneg(x,{n=-1}): bitwise negation of an integers x truncated to n bits. n=-1 means represent infinite sequences of bit 1 as negative numbers. Negative numbers behave as if modulo big power of 2", - "bitnegimply(x,y): bitwise \"negated imply\" of two integers x and y, in other words, x BITAND BITNEG(y). Negative numbers behave as if modulo big power of 2", - "bitor(x,y): bitwise \"or\" of two integers x and y. Negative numbers behave as if modulo big power of 2", - "bittest(x,n,{c=1}): extracts |c| bits starting from number n (coefficient of 2^n) of the integer x, returning the bits as an integer bitmap; negative c means: treat negative values of x as if modulo big power of 2; bits at negative offsets are zeros", - "bitxor(x,y): bitwise \"exclusive or\" of two integers x and y. Negative numbers behave as if modulo big power of 2", - "bnfcertify(bnf): certify the correctness (i.e. remove the GRH) of the bnf data output by bnfclassunit or bnfinit", - "bnfclassunit(P,{flag=0},{tech=[]}): compute the class group, regulator of the number field defined by the polynomial P, and also the fundamental units if they are not too large. flag and tech are both optional. flag can be any of 0: default, 1: insist on having fundamental units, 2: do not compute units. See manual for details about tech. P may also be a non-zero integer, and is then considered as the discriminant of a quadratic order", - "bnfclgp(P,{tech=[]}): compute the class group of the number field defined by the polynomial P. If P is a non-zero integer, it is interpreted as a quadratic discriminant. See manual for details about tech", - "bnfdecodemodule(nf,fa): given a coded module fa as in bnrdisclist, gives the true module", - "bnfinit(P,{flag=0},{tech=[]}): compute the necessary data for future use in ideal and unit group computations, including fundamental units if they are not too large. flag and tech are both optional. flag can be any of 0: default, 1: insist on having fundamental units, 2: do not compute units, 3: small bnfinit, which can be converted to a big one using bnfmake. See manual for details about tech", - "bnfisintnorm(bnf,x): compute a complete system of solutions (modulo units of positive norm) of the absolute norm equation N(a)=x, where a belongs to the maximal order of big number field bnf (if bnf is not certified, this depends on GRH)", - "bnfisnorm(bnf,x,{flag=1}): Tries to tell whether x (in Q) is the norm of some fractional y (in bnf). Returns a vector [a,b] where x=Norm(a)*b. Looks for a solution which is a S-unit, with S a certain list of primes (in bnf) containing (among others) all primes dividing x. If bnf is known to be Galois, set flag=0 (in this case, x is a norm iff b=1). If flag is non zero the program adds to S all the primes : dividing flag if flag<0, or less than flag if flag>0. The answer is guaranteed (i.e x norm iff b=1) under GRH, if S contains all primes less than 12.log(disc(Bnf))^2, where Bnf is the Galois closure of bnf", - "bnfisprincipal(bnf,x,{flag=1}): bnf being output by bnfinit (with flag<=2), gives [v,alpha,bitaccuracy], where v is the vector of exponents on the class group generators and alpha is the generator of the resulting principal ideal. In particular x is principal if and only if v is the zero vector. flag is optional, whose meaning is: 0: output only v; 1: default; 2: output only v, precision being doubled until the result is obtained; 3: as 2 but output generators", - "bnfissunit(bnf,sfu,x): bnf being output by bnfinit (with flag<=2), sfu by bnfsunit, gives the column vector of exponents of x on the fundamental S-units and the roots of unity if x is a unit, the empty vector otherwise", - "bnfisunit(bnf,x): bnf being output by bnfinit (with flag<=2), gives the column vector of exponents of x on the fundamental units and the roots of unity if x is a unit, the empty vector otherwise", - "bnfmake(sbnf): transforms small sbnf as output by bnfinit with flag=3 into a true big bnf", - "bnfnarrow(bnf): given a big number field as output by bnfinit, gives as a 3-component vector the structure of the narrow class group", - "bnfreg(P,{tech=[]}): compute the regulator of the number field defined by the polynomial P. If P is a non-zero integer, it is interpreted as a quadratic discriminant. See manual for details about tech", - "bnfsignunit(bnf): matrix of signs of the real embeddings of the system of fundamental units found by bnfinit", - "bnfsunit(bnf,S): compute the fundamental S-units of the number field bnf output by bnfinit, S being a list of prime ideals. res[1] contains the S-units, res[5] the S-classgroup. See manual for details", - "bnfunit(bnf): compute the fundamental units of the number field bnf output by bnfinit when they have not yet been computed (i.e. with flag=2)", - "bnrL1(bnr, {subgroup}, {flag=0}): bnr being output by bnrinit(,,1) and subgroup being a square matrix defining a congruence subgroup of bnr (the trivial subgroup if omitted), for each character of bnr trivial on this subgroup, compute L(1, chi) (or equivalently the first non-zero term c(chi) of the expansion at s = 0). The binary digits of flag mean 1: if 0 then compute the term c(chi) and return [r(chi), c(chi)] where r(chi) is the order of L(s, chi) at s = 0, or if 1 then compute the value at s = 1 (and in this case, only for non-trivial characters), 2: if 0 then compute the value of the primitive L-function associated to chi, if 1 then compute the value of the L-function L_S(s, chi) where S is the set of places dividing the modulus of bnr (and the infinite places), 3: return also the characters", - "bnrclass(bnf,ideal,{flag=0}): given a big number field as output by bnfinit (only) and an ideal or a 2-component row vector formed by an ideal and a list of R1 zeros or ones representing a module, finds the ray class group structure corresponding to this module. flag is optional, and can be 0: default, 1: compute data necessary for working in the ray class group, for example with functions such as bnrisprincipal or bnrdisc, without computing the generators of the ray class group, or 2: with the generators. When flag=1 or 2, the fifth component is the ray class group structure obtained when flag=0", - "bnrclassno(bnf,x): ray class number of the module x for the big number field bnf. Faster than bnrclass if only the ray class number is wanted", - "bnrclassnolist(bnf,list): if list is as output by ideallist or similar, gives list of corresponding ray class numbers", - "bnrconductor(a1,{a2},{a3},{flag=0}): conductor f of the subfield of the ray class field given by a1,a2,a3 (see bnrdisc). flag is optional and can be 0: default, 1: returns [f, Cl_f, H], H subgroup of the ray class group modulo f defining the extension, 2: returns [f, bnr(f), H]", - "bnrconductorofchar(bnr,chi): conductor of the character chi on the ray class group bnr", - "bnrdisc(a1,{a2},{a3},{flag=0}): absolute or relative [N,R1,discf] of the field defined by a1,a2,a3. [a1,{a2},{a3}] is of type [bnr], [bnr,subgroup], [bnf, module] or [bnf,module,subgroup], where bnf is as output by bnfclassunit (with flag<=2), bnr by bnrclass (with flag>0), and subgroup is the HNF matrix of a subgroup of the corresponding ray class group (if omitted, the trivial subgroup). flag is optional whose binary digits mean 1: give relative data; 2: return 0 if module is not the conductor", - "bnrdisclist(bnf,bound,{arch},{flag=0}): gives list of discriminants of ray class fields of all conductors up to norm bound, where the ramified Archimedean places are given by arch (unramified at infinity if arch is void), in a long vector format. If (optional) flag is present and non-null, give arch all the possible values. Supports the alternative syntax bnrdisclist(bnf,list), where list is as output by ideallist or ideallistarch (with units)", - "bnrinit(bnf,ideal,{flag=0}): given a big number field as output by bnfinit (only) and an ideal or a 2-component row vector formed by an ideal and a list of R1 zeros or ones representing a module, initializes data linked to the ray class group structure corresponding to this module. flag is optional, and can be 0: default (same as bnrclass with flag = 1), 1: compute also the generators (same as bnrclass with flag = 2). The fifth component is the ray class group structure", - "bnrisconductor(a1,{a2},{a3}): returns 1 if the modulus is the conductor of the subfield of the ray class field given by a1,a2,a3 (see bnrdisc), and 0 otherwise. Slightly faster than bnrconductor if this is the only desired result", - "bnrisprincipal(bnr,x,{flag=1}): bnr being output by bnrinit, gives [v,alpha,bitaccuracy], where v is the vector of exponents on the class group generators and alpha is the generator of the resulting principal ideal. In particular x is principal if and only if v is the zero vector. If (optional) flag is set to 0, output only v", - "bnrrootnumber(bnr,chi,{flag=0}); returns the so-called Artin Root Number, i.e. the constant W appearing in the functional equation of the Hecke L-function associated to chi. Set flag = 1 if the character is known to be primitive", - "bnrstark(bnr,{subgroup},{flag=0}): bnr being as output by bnrinit(,,1), finds a relative equation for the class field corresponding to the module in bnr and the given congruence subgroup (the trivial subgroup if omitted) using Stark's units. The ground field and the class field must be totally real. flag is optional and may be set to 0 to obtain a reduced polynomial, 1 to obtain a non reduced polynomial, 2 to obtain an absolute polynomial and 3 to obtain the irreducible polynomial of the Stark unit, 0 being default. If 4 is added to the value of flag, try hard to find the best modulus", - "break({n=1}): interrupt execution of current instruction sequence, and exit from the n innermost enclosing loops", - "ceil(x): ceiling of x=smallest integer>=x", - "centerlift(x,{v}): centered lift of x. Same as lift except for integermods", - "changevar(x,y): change variables of x according to the vector y", - "charpoly(A,{v=x},{flag=0}): det(v*Id-A)=characteristic polynomial of the matrix A using the comatrix. flag is optional and may be set to 1 (use Lagrange interpolation) or 2 (use Hessenberg form), 0 being the default", - "chinese(x,{y}): x,y being integers modulo mx and my, finds z such that z is congruent to x mod mx and y mod my", - "component(x,s): the s'th component of the internal representation of x. For vectors or matrices, it is simpler to use x[]. For list objects such as nf, bnf, bnr or ell, it is much easier to use member functions starting with \".\" ", - "concat(x,{y}): concatenation of x and y, which can be scalars, vectors or matrices, or lists (in this last case, both x and y have to be lists). If y is omitted, x has to be a list or row vector and its elements are concatenated", - "conj(x): the algebraic conjugate of x", - "conjvec(x): conjugate vector of the algebraic number x", - "content(x): gcd of all the components of x, when this makes sense", - "contfrac(x,{b},{lmax}): continued fraction expansion of x (x rational,real or rational function). b and lmax are both optional, where b is the vector of numerators of the continued fraction, and lmax is a bound for the number of terms in the continued fraction expansion", - "contfracpnqn(x): [p_n,p_{n-1}; q_n,q_{n-1}] corresponding to the continued fraction x", - "core(n,{flag=0}): unique (positive of negative) squarefree integer d dividing n such that n/d is a square. If (optional) flag is non-null, output the two-component row vector [d,f], where d is the unique squarefree integer dividing n such that n/d=f^2 is a square", - "coredisc(n,{flag=0}): discriminant of the quadratic field Q(sqrt(n)). If (optional) flag is non-null, output a two-component row vector [d,f], where d is the discriminant of the quadratic field Q(sqrt(n)) and n=df^2. f may be a half integer", - "cos(x): cosine of x", - "cosh(x): hyperbolic cosine of x", - "cotan(x): cotangent of x", - "denominator(x): denominator of x (or lowest common denominator in case of an array)", - "deriv(x,{y}): derivative of x with respect to the main variable of y, or to the main variable of x if y is omitted", - "dilog(x): dilogarithm of x", - "dirdiv(x,y): division of the Dirichlet series x by the Dirichlet series y", - "direuler(p=a,b,expr,{c}): Dirichlet Euler product of expression expr from p=a to p=b, limited to b terms. Expr should be a polynomial or rational function in p and X, and X is understood to mean p^(-s). If c is present, output only the first c terms", - "dirmul(x,y): multiplication of the Dirichlet series x by the Dirichlet series y", - "dirzetak(nf,b): Dirichlet series of the Dedekind zeta function of the number field nf up to the bound b-1", - "divisors(x): gives a vector formed by the divisors of x in increasing order", - "divrem(x,y,{v}): euclidean division of x by y giving as a 2-dimensional column vector the quotient and the remainder, with respect to v (to main variable if v is omitted)", - "eint1(x,{n}): exponential integral E1(x). If n is present, computes the vector of the first n values of the exponential integral E1(n.x) (x > 0)", - "elladd(e,z1,z2): sum of the points z1 and z2 on elliptic curve e", - "ellak(e,n): computes the n-th Fourier coefficient of the L-function of the elliptic curve e", - "ellan(e,n): computes the first n Fourier coefficients of the L-function of the elliptic curve e (n<2^24 on a 32-bit machine)", - "ellap(e,p,{flag=0}): computes a_p for the elliptic curve e using Shanks-Mestre's method. flag is optional and can be set to 0 (default) or 1 (use Jacobi symbols)", - "ellbil(e,z1,z2): canonical bilinear form for the points z1,z2 on the elliptic curve e. Either z1 or z2 can also be a vector/matrix of points", - "ellchangecurve(x,y): change data on elliptic curve according to y=[u,r,s,t]", - "ellchangepoint(x,y): change data on point or vector of points x on an elliptic curve according to y=[u,r,s,t]", - "elleisnum(om,k,{flag=0}): om=[om1,om2] being a 2-component vector giving a basis of a lattice L and k an even positive integer, computes the numerical value of the Eisenstein series of weight k. When flag is non-zero and k=4 or 6, this gives g2 or g3 with the correct normalization", - "elleta(om): om=[om1,om2], returns the two-component row vector [eta1,eta2] of quasi-periods associated to [om1,om2]", - "ellglobalred(e): e being an elliptic curve, returns [N,[u,r,s,t],c], where N is the conductor of e, [u,r,s,t] leads to the standard model for e, and c is the product of the local Tamagawa numbers c_p", - "ellheight(e,x,{flag=0}): canonical height of point x on elliptic curve E defined by the vector e. flag is optional and should be 0 or 1 (0 by default): 0: use theta-functions, 1: use Tate's method", - "ellheightmatrix(e,x): gives the height matrix for vector of points x on elliptic curve e using theta functions", - "ellinit(x,{flag=0}): x being the vector [a1,a2,a3,a4,a6], gives the vector: [a1,a2,a3,a4,a6,b2,b4,b6,b8,c4,c6,delta,j,[e1,e2,e3],w1,w2,eta1,eta2,area]. If the curve is defined over a p-adic field, the last six components are replaced by root,u^2,u,q,w,0. If optional flag is 1, omit them altogether", - "ellisoncurve(e,x): true(1) if x is on elliptic curve e, false(0) if not", - "ellj(x): elliptic j invariant of x", - "elllocalred(e,p): e being an elliptic curve, returns [f,kod,[u,r,s,t],c], where f is the conductor's exponent, kod is the kodaira type for e at p, [u,r,s,t] is the change of variable needed to make e minimal at p, and c is the local Tamagawa number c_p", - "elllseries(e,s,{A=1}): L-series at s of the elliptic curve e, where A a cut-off point close to 1", - "ellminimalmodel(e,{&v}): return the standard minimal integral model of the rational elliptic curve e. Sets v to the corresponding change of variables", - "ellorder(e,p): order of the point p on the elliptic curve e over Q, 0 if non-torsion", - "ellordinate(e,x): y-coordinates corresponding to x-ordinate x on elliptic curve e", - "ellpointtoz(e,P): lattice point z corresponding to the point P on the elliptic curve e", - "ellpow(e,x,n): n times the point x on elliptic curve e (n in Z)", - "ellrootno(e,{p=1}): root number for the L-function of the elliptic curve e. p can be 1 (default), global root number, or a prime p (including 0) for the local root number at p", - "ellsigma(om,z,{flag=0}): om=[om1,om2], value of the Weierstrass sigma function of the lattice generated by om at z if flag = 0 (default). If flag = 1, arbitrary determination of the logarithm of sigma. If flag = 2 or 3, same but using the product expansion instead of theta series", - "ellsub(e,z1,z2): difference of the points z1 and z2 on elliptic curve e", - "elltaniyama(e): modular parametrization of elliptic curve e", - "elltors(e,{flag=0}): torsion subgroup of elliptic curve e: order, structure, generators. If flag = 0, use Doud's algorithm; if flag = 1, use Lutz-Nagell", - "ellwp(e,{z=x},{flag=0}): Complex value of Weierstrass P function at z on the lattice generated over Z by e=[om1,om2] (e as given by ellinit is also accepted). Optional flag means 0 (default), compute only P(z), 1 compute [P(z),P'(z)], 2 consider om as an elliptic curve and compute P(z) for that curve (identical to ellztopoint in that case). If z is omitted or is a simple variable, return formal expansion in z", - "ellzeta(om,z): om=[om1,om2], value of the Weierstrass zeta function of the lattice generated by om at z", - "ellztopoint(e,z): coordinates of point P on the curve e corresponding to the complex number z", - "erfc(x): complementary error function", - "eta(x,{flag=0}): if flag=0, eta function without the q^(1/24), otherwise eta of the complex number x in the upper half plane intelligently computed using SL(2,Z) transformations", - "eulerphi(x): Euler's totient function of x", - "eval(x): evaluation of x, replacing variables by their value", - "exp(x): exponential of x", - "factor(x,{lim}): factorization of x. lim is optional and can be set whenever x is of (possibly recursive) rational type. If lim is set return partial factorization, using primes up to lim (up to primelimit if lim=0)", - "factorback(f,{e},{nf}): given a factorisation f, gives the factored object back. If this is a prime ideal factorisation you must supply the corresponding number field as last argument. If e is present, f has to be a vector of the same length, and we return the product of the f[i]^e[i]", - "factorcantor(x,p): factorization mod p of the polynomial x using Cantor-Zassenhaus", - "factorff(x,p,a): factorization of the polynomial x in the finite field F_p[X]/a(X)F_p[X]", - "factorial(x): factorial of x (x C-integer), the result being given as a real number", - "factorint(x,{flag=0}): factor the integer x. flag is optional, whose binary digits mean 1: avoid MPQS, 2: avoid first-stage ECM (may fall back on it later), 4: avoid Pollard-Brent Rho and Shanks SQUFOF, 8: skip final ECM (huge composites will be declared prime)", - "factormod(x,p,{flag=0}): factorization mod p of the polynomial x using Berlekamp. flag is optional, and can be 0: default or 1: simple factormod, same except that only the degrees of the irreducible factors are given", - "factornf(x,t): factorization of the polynomial x over the number field defined by the polynomial t", - "factorpadic(x,p,r,{flag=0}): p-adic factorization of the polynomial x to precision r. flag is optional and may be set to 0 (use round 4) or 1 (use Buchmann-Lenstra)", - "ffinit(p,n,{v=x}): monic irreducible polynomial of degree n over F_p[v]", - "fibonacci(x): fibonacci number of index x (x C-integer)", - "floor(x): floor of x = largest integer<=x", - "for(X=a,b,seq): the sequence is evaluated, X going from a up to b", - "fordiv(n,X,seq): the sequence is evaluated, X running over the divisors of n", - "forprime(X=a,b,seq): the sequence is evaluated, X running over the primes between a and b", - "forstep(X=a,b,s,seq): the sequence is evaluated, X going from a to b in steps of s (can be a vector of steps)", - "forsubgroup(H=G,{bound},seq): execute seq for each subgroup H of the abelian group G (in SNF form), whose index is bounded by bound. H is given as a left divisor of G in HNF form", - "forvec(x=v,seq,{flag=0}): v being a vector of two-component vectors of length n, the sequence is evaluated with x[i] going from v[i][1] to v[i][2] for i=n,..,1 if flag is zero or omitted. If flag = 1 (resp. flag = 2), restrict to increasing (resp. strictly increasing) sequences", - "frac(x): fractional part of x = x-floor(x)", - "galoisexport(gal,{flag}): gal being a galois field as output by galoisinit, output a string representing the underlying permutation group in GAP notation (default) or Magma notation (flag = 1)", - "galoisfixedfield(gal,perm,{flag},{v=y}): gal being a galois field as output by galoisinit and perm an element of gal.group or a vector of such elements, return [P,x] such that P is a polynomial defining the fixed field of gal[1] by the subgroup generated by perm, and x is a root of P in gal expressed as a polmod in gal.pol. If flag is 1 return only P. If flag is 2 return [P,x,F] where F is the factorization of gal.pol over the field defined by P, where the variable v stands for a root of P", - "galoisidentify(gal): gal being a galois field as output by galoisinit, output the isomorphism class of the underlying abstract group as a two-components vector [o,i], where o is the group order, and i is the group index in the GAP4 small group library", - "galoisinit(pol,{den}): pol being a polynomial or a number field as output by nfinit defining a Galois extension of Q, compute the Galois group and all neccessary informations for computing fixed fields. den is optional and has the same meaning as in nfgaloisconj(,4)(see manual)", - "galoisisabelian(gal,{flag=0}): gal being as output by galoisinit, return 0 if gal is not abelian, the HNF matrix of gal over gal.gen if flag=0, 1 if flag is 1, and the SNF of gal is flag=2", - "galoispermtopol(gal,perm): gal being a galois field as output by galoisinit and perm a element of gal.group, return the polynomial defining the corresponding Galois automorphism", - "galoissubcyclo(N,H,{fl=0},{v}):Compute a polynomial (in variable v) defining the subfield of Q(zeta_n) fixed by the subgroup H of (Z/nZ)*. N can be an integer n, znstar(n) or bnrinit(bnfinit(y),[n,[1]],1). H can be given by a generator, a set of generator given by a vector or a HNF matrix (see manual). If flag is 1, output only the conductor of the abelian extension. If flag is 2 output [pol,f] where pol is the polynomial and f the conductor.", - "galoissubfields(G,{flags=0},{v}):Output all the subfields of G. flags have the same meaning as for galoisfixedfield", - "galoissubgroups(G):Output all the subgroups of G", - "gamma(x): gamma function at x", - "gammah(x): gamma of x+1/2 (x integer)", - "gcd(x,{y},{flag=0}): greatest common divisor of x and y. flag is optional, and can be 0: default, 1: use the modular gcd algorithm (x and y must be polynomials), 2 use the subresultant algorithm (x and y must be polynomials)", - "getheap(): 2-component vector giving the current number of objects in the heap and the space they occupy", - "getrand(): current value of random number seed", - "getstack(): current value of stack pointer avma", - "gettime(): time (in milliseconds) since last call to gettime", - "hilbert(x,y,{p}): Hilbert symbol at p of x,y. If x,y are integermods or p-adic, p can be omitted", - "hyperu(a,b,x): U-confluent hypergeometric function", - "idealadd(nf,x,y): sum of two ideals x and y in the number field defined by nf", - "idealaddtoone(nf,x,{y}): if y is omitted, when the sum of the ideals in the number field K defined by nf and given in the vector x is equal to Z_K, gives a vector of elements of the corresponding ideals who sum to 1. Otherwise, x and y are ideals, and if they sum up to 1, find one element in each of them such that the sum is 1", - "idealappr(nf,x,{flag=0}): x being a fractional ideal, gives an element b such that v_p(b)=v_p(x) for all prime ideals p dividing x, and v_p(b)>=0 for all other p. If (optional) flag is non-null x must be a prime ideal factorization with possibly zero exponents", - "idealchinese(nf,x,y): x being a prime ideal factorization and y a vector of elements, gives an element b such that v_p(b-y_p)>=v_p(x) for all prime ideals p dividing x, and v_p(b)>=0 for all other p", - "idealcoprime(nf,x,y): gives an element b in nf such that b. x is an integral ideal coprime to the integral ideal y", - "idealdiv(nf,x,y,{flag=0}): quotient x/y of two ideals x and y in HNF in the number field nf. If (optional) flag is non-null, the quotient is supposed to be an integral ideal (slightly faster)", - "idealfactor(nf,x): factorization of the ideal x given in HNF into prime ideals in the number field nf", - "idealhnf(nf,a,{b}): hermite normal form of the ideal a in the number field nf, whatever form a may have. If called as idealhnf(nf,a,b), the ideal is given as aZ_K+bZ_K in the number field K defined by nf", - "idealintersect(nf,x,y): intersection of two ideals x and y in the number field defined by nf", - "idealinv(nf,x,{flag=0}): inverse of the ideal x in the number field nf. If flag is omitted or set to 0, use the different. If flag is 1 do not use it", - "ideallist(nf,bound,{flag=4}): vector of vectors L of all idealstar of all ideals of norm<=bound. If (optional) flag is present, its binary digits are toggles meaning 1: give generators; 2: output [L,U], where L is as before, and U is a vector of vector of zinternallogs of the units; 4: give only the ideals and not the idealstar", - "ideallistarch(nf,list,{arch=[]},{flag=0}): vector of vectors of all idealstarinit of all modules in list with archimedean arch (void if ommited or arch=[]) added. flag is optional whose binary digits are toggles meaning 1: give generators as well; 2: list format is [L,U], see ideallist", - "ideallog(nf,x,bid): if bid is a big ideal, as given by idealstar(nf,I,1) or idealstar(nf,I,2), gives the vector of exponents on the generators bid[2][3] (even if these generators have not been computed)", - "idealmin(nf,ix,{vdir}): minimum of the ideal ix in the direction vdir in the number field nf", - "idealmul(nf,x,y,{flag=0}): product of the two ideals x and y in the number field nf. If (optional) flag is non-nul, reduce the result", - "idealnorm(nf,x): norm of the ideal x in the number field nf", - "idealpow(nf,x,n,{flag=0}): n-th power of the ideal x in HNF in the number field nf If (optional) flag is non-null, reduce the result", - "idealprimedec(nf,p): prime ideal decomposition of the prime number p in the number field nf as a vector of 5 component vectors [p,a,e,f,b] representing the prime ideals pZ_K+a. Z_K, e,f as usual, a as vector of components on the integral basis, b Lenstra's constant", - "idealprincipal(nf,x): returns the principal ideal generated by the algebraic number x in the number field nf", - "idealred(nf,x,{vdir=0}): LLL reduction of the ideal x in the number field nf along direction vdir, in HNF", - "idealstar(nf,I,{flag=1}): gives the structure of (Z_K/I)^*. flag is optional, and can be 0: simply gives the structure as a 3-component vector v such that v[1] is the order (i.e. eulerphi(I)), v[2] is a vector of cyclic components, and v[3] is a vector giving the corresponding generators. If flag=1 (default), gives idealstarinit, i.e. a 6-component vector [I,v,fa,f2,U,V] where v is as above without the generators, fa is the prime ideal factorisation of I and f2, U and V are technical but essential to work in (Z_K/I)^*. Finally if flag=2, same as with flag=1 except that the generators are also given", - "idealtwoelt(nf,x,{a}): two-element representation of an ideal x in the number field nf. If (optional) a is non-zero, first element will be equal to a", - "idealval(nf,x,p): valuation at p given in idealprimedec format of the ideal x in the number field nf", - "ideleprincipal(nf,x): returns the principal idele generated by the algebraic number x in the number field nf", - "if(a,seq1,seq2): if a is nonzero, seq1 is evaluated, otherwise seq2. seq1 and seq2 are optional, and if seq2 is omitted, the preceding comma can be omitted also", - "imag(x): imaginary part of x", - "incgam(s,x,{y}): incomplete gamma function. y is optional and is the precomputed value of gamma(s)", - "incgamc(s,x): complementary incomplete gamma function", - "intformal(x,{y}): formal integration of x with respect to the main variable of y, or to the main variable of x if y is omitted", - "intnum(X=a,b,s,{flag=0}): numerical integration of s (smooth in ]a,b[) from a to b with respect to X. flag is optional and mean 0: default. s can be evaluated exactly on [a,b]; 1: general function; 2: a or b can be plus or minus infinity (chosen suitably), but of same sign; 3: s has only limits at a or b", - "isfundamental(x): true(1) if x is a fundamental discriminant (including 1), false(0) if not", - "isprime(x,{flag=0}): if flag is omitted or 0, true(1) if x is a (proven) prime number, false(0) if not. If flag is 1, the primality is certified by the Pocklington-Lehmer Test. If flag is 2, the primality is certified using the APRCL test.", - "ispseudoprime(x,{n}): true(1) if x is a strong pseudoprime, false(0) if not. If n is 0 or omitted, use BPSW test, otherwise use strong Rabin-Miller test for n randomly chosen bases", - "issquare(x,{&n}): true(1) if x is a square, false(0) if not. If n is given puts the exact square root there if it was computed", - "issquarefree(x): true(1) if x is squarefree, false(0) if not", - "kronecker(x,y): kronecker symbol (x/y)", - "lcm(x,{y}): least common multiple of x and y=x*y/gcd(x,y)", - "length(x): number of non code words in x, number of characters for a string", - "lex(x,y): compare x and y lexicographically (1 if x>y, 0 if x=y, -1 if x<y)", - "lift(x,{v}): lifts every element of Z/nZ to Z or T[x]/PT[x] to T[x] for a type T if v is omitted, otherwise lift only polymods with main variable v. If v does not occur in x, lift only intmods", - "lindep(x,{flag=0}): Z-linear dependencies between components of x. flag is optional, and can be 0: default, using Hastad et al; positive, and in that case should be between 0.5 and 1.0 times the accuracy in decimal digits of x, using a standard LLL; or negative in which case it returns, once a relation has been found", - "listcreate(n): creates an empty list of length n", - "listinsert(list,x,n): insert x at index n in list, shifting the remaining elements to the right", - "listkill(list): kills list", - "listput(list,x,{n}): sets n-th element of list equal to x. If n is omitted or greater than the current list length, just append x", - "listsort(list,{flag=0}): sort list in place. If flag is non-zero, suppress all but one occurence of each element in list", - "lngamma(x): logarithm of the gamma function of x", - "log(x,{flag=0}): natural logarithm of x. flag is optional, and can be 0: default, or 1: calls logagm, computed using the agm", - "matadjoint(x): adjoint matrix of x", - "matalgtobasis(nf,x): nfalgtobasis applied to every element of the matrix x", - "matbasistoalg(nf,x): nfbasistoalg applied to every element of the matrix x", - "matcompanion(x): companion matrix to polynomial x", - "matdet(x,{flag=0}): determinant of the matrix x using Gauss-Bareiss. If (optional) flag is set to 1, use classical gaussian elimination (slightly better for integer entries)", - "matdetint(x): some multiple of the determinant of the lattice generated by the columns of x (0 if not of maximal rank). Useful with mathnfmod", - "matdiagonal(x): creates the diagonal matrix whose diagonal entries are the entries of the vector x", - "mateigen(x): eigenvectors of the matrix x given as columns of a matrix", - "mathess(x): Hessenberg form of x", - "mathilbert(n): Hilbert matrix of order n (n C-integer)", - "mathnf(x,{flag=0}): (upper triangular) Hermite normal form of x, basis for the lattice formed by the columns of x. flag is optional whose value range from 0 to 4 (0 if omitted), meaning : 0: naive algorithm. 1: Use Batut's algorithm. Output 2-component vector [H,U] such that H is the HNF of x, and U is a unimodular matrix such that xU=H. 3: Use Batut's algorithm. Output [H,U,P] as in 2. 4: as 1, using a heuristic variant of LLL reduction along the way", - "mathnfmod(x,d): (upper triangular) Hermite normal form of x, basis for the lattice formed by the columns of x, where d is a multiple of the non-zero determinant of this lattice", - "mathnfmodid(x,d): (upper triangular) Hermite normal form of x concatenated with d times the identity matrix", - "matid(n): identity matrix of order n (n C-integer)", - "matimage(x,{flag=0}): basis of the image of the matrix x. flag is optional and can be set to 0 or 1, corresponding to two different algorithms", - "matimagecompl(x): vector of column indices not corresponding to the indices given by the function matimage", - "matindexrank(x): gives two extraction vectors (rows and columns) for the matrix x such that the extracted matrix is square of maximal rank", - "matintersect(x,y): intersection of the vector spaces whose bases are the columns of x and y", - "matinverseimage(x,y): an element of the inverse image of the vector y by the matrix x if one exists, the empty vector otherwise", - "matisdiagonal(x): true(1) if x is a diagonal matrix, false(0) otherwise", - "matker(x,{flag=0}): basis of the kernel of the matrix x. flag is optional, and may be set to 0: default; non-zero: x is known to have integral entries", - "matkerint(x,{flag=0}): LLL-reduced Z-basis of the kernel of the matrix x with integral entries. flag is optional, and may be set to 0: default, uses a modified LLL, 1: uses matrixqz3 and the HNF, 2: uses another modified LLL", - "matmuldiagonal(x,d): product of matrix x by diagonal matrix whose diagonal coefficients are those of the vector d, equivalent but faster than x*matdiagonal(d)", - "matmultodiagonal(x,y): product of matrices x and y, knowing that the result will be a diagonal matrix. Much faster than general multiplication in that case", - "matpascal(n,{q}): Pascal triangle of order n if q is omited. q-Pascal triangle otherwise", - "matrank(x): rank of the matrix x", - "matrix(m,n,{X},{Y},{expr=0}): mXn matrix of expression expr, the row variable X going from 1 to m and the column variable Y going from 1 to n. By default, fill with 0s", - "matrixqz(x,p): if p>=0, transforms the rational or integral mxn (m>=n) matrix x into an integral matrix with gcd of maximal determinants equal to 1 if p is equal to 0, not divisible by p otherwise. If p=-1, finds a basis of the intersection with Z^n of the lattice spanned by the columns of x. If p=-2, finds a basis of the intersection with Z^n of the Q-vector space spanned by the columns of x", - "matsize(x): number of rows and columns of the vector/matrix x as a 2-vector", - "matsnf(x,{flag=0}): Smith normal form (i.e. elementary divisors) of the matrix x, expressed as a vector d. Binary digits of flag mean 1: returns [u,v,d] where d=u*x*v, otherwise only the diagonal d is returned, 2: allow polynomial entries, otherwise assume x is integral, 4: removes all information corresponding to entries equal to 1 in d", - "matsolve(M,B): gaussian solution of MX=B (M matrix, B column vector)", - "matsolvemod(M,D,B,{flag=0}): one solution of system of congruences MX=B mod D (M matrix, B and D column vectors). If (optional) flag is non-null return all solutions", - "matsupplement(x): supplement the columns of the matrix x to an invertible matrix", - "mattranspose(x): x~=transpose of x", - "max(x,y): maximum of x and y", - "min(x,y): minimum of x and y", - "modreverse(x): reverse polymod of the polymod x, if it exists", - "moebius(x): Moebius function of x", - "newtonpoly(x,p): Newton polygon of polynomial x with respect to the prime p", - "next({n=1}): interrupt execution of current instruction sequence, and start another iteration from the n-th innermost enclosing loops", - "nextprime(x): smallest prime number>=x", - "nfalgtobasis(nf,x): transforms the algebraic number x into a column vector on the integral basis nf.zk", - "nfbasis(x,{flag=0},{p}): integral basis of the field Q[a], where a is a root of the polynomial x, using the round 4 algorithm. Second and third args are optional. Binary digits of flag mean 1: assume that no square of a prime>primelimit divides the discriminant of x, 2: use round 2 algorithm instead. If present, p provides the matrix of a partial factorization of the discriminant of x, useful if one wants only an order maximal at certain primes only", - "nfbasistoalg(nf,x): transforms the column vector x on the integral basis into an algebraic number", - "nfdetint(nf,x): multiple of the ideal determinant of the pseudo generating set x", - "nfdisc(x,{flag=0},{p}): discriminant of the number field defined by the polynomial x using round 4. Optional args flag and p are as in nfbasis", - "nfeltdiv(nf,a,b): element a/b in nf", - "nfeltdiveuc(nf,a,b): gives algebraic integer q such that a-bq is small", - "nfeltdivmodpr(nf,a,b,pr): element a/b modulo pr in nf, where pr is in modpr format (see nfmodprinit)", - "nfeltdivrem(nf,a,b): gives [q,r] such that r=a-bq is small", - "nfeltmod(nf,a,b): gives r such that r=a-bq is small with q algebraic integer", - "nfeltmul(nf,a,b): element a. b in nf", - "nfeltmulmodpr(nf,a,b,pr): element a. b modulo pr in nf, where pr is in modpr format (see nfmodprinit)", - "nfeltpow(nf,a,k): element a^k in nf", - "nfeltpowmodpr(nf,a,k,pr): element a^k modulo pr in nf, where pr is in modpr format (see nfmodprinit)", - "nfeltreduce(nf,a,id): gives r such that a-r is in the ideal id and r is small", - "nfeltreducemodpr(nf,a,pr): element a modulo pr in nf, where pr is in modpr format (see nfmodprinit)", - "nfeltval(nf,a,pr): valuation of element a at the prime pr as output by idealprimedec", - "nffactor(nf,x): factor polynomial x in number field nf", - "nffactormod(nf,pol,pr): factorize polynomial pol modulo prime ideal pr in number field nf", - "nfgaloisapply(nf,aut,x): Apply the Galois automorphism sigma (polynomial or polymod) to the object x (element or ideal) in the number field nf", - "nfgaloisconj(nf,{flag=0},{den}): list of conjugates of a root of the polynomial x=nf.pol in the same number field. flag is optional (set to 0 by default), meaning 0: use combination of flag 4 and 1, always complete; 1: use nfroots; 2 : use complex numbers, LLL on integral basis (not always complete); 4: use Allombert's algorithm, complete if the field is Galois of degree <= 35 (see manual for detail). nf can be simply a polynomial with flag 0,2 and 4, meaning: 0: use combination of flag 4 and 2, not always complete (but a warning is issued when the list is not proven complete); 2 & 4: same meaning and restrictions. Note that only flag 4 can be applied to fields of large degrees (approx. >= 20)", - "nfhilbert(nf,a,b,{p}): if p is omitted, global Hilbert symbol (a,b) in nf, that is 1 if X^2-aY^2-bZ^2 has a non-trivial solution (X,Y,Z) in nf, -1 otherwise. Otherwise compute the local symbol modulo the prime ideal p", - "nfhnf(nf,x): if x=[A,I], gives a pseudo-basis of the module sum A_jI_j", - "nfhnfmod(nf,x,detx): if x=[A,I], and detx is a multiple of the ideal determinant of x, gives a pseudo-basis of the module sum A_jI_j", - "nfinit(pol,{flag=0}): pol being a nonconstant irreducible polynomial, gives the vector: [pol,[r1,r2],discf,index,[M,MC,T2,T,different] (see manual),r1+r2 first roots, integral basis, matrix of power basis in terms of integral basis, multiplication table of basis]. flag is optional and can be set to 0: default; 1: do not compute different; 2: first use polred to find a simpler polynomial; 3: outputs a two-element vector [nf,Mod(a,P)], where nf is as in 2 and Mod(a,P) is a polymod equal to Mod(x,pol) and P=nf.pol; 4: as 2 but use a partial polred; 5: is to 3 what 4 is to 2", - "nfisideal(nf,x): true(1) if x is an ideal in the number field nf, false(0) if not", - "nfisincl(x,y): tests whether the number field x is isomorphic to a subfield of y (where x and y are either polynomials or number fields as output by nfinit). Return 0 if not, and otherwise all the isomorphisms. If y is a number field, a faster algorithm is used", - "nfisisom(x,y): as nfisincl but tests whether x is isomorphic to y", - "nfkermodpr(nf,x,pr): kernel of the matrix x in Z_K/pr, where pr is in modpr format (see nfmodprinit)", - "nfmodprinit(nf,pr): transform the 5 element row vector pr representing a prime ideal into modpr format necessary for all operations mod pr in the number field nf (see manual for details about the format)", - "nfnewprec(nf): transform the number field data nf into new data using the current (usually larger) precision", - "nfroots({nf},pol): roots of polynomial pol belonging to nf (Q if omitted) without multiplicity", - "nfrootsof1(nf): number of roots of unity and primitive root of unity in the number field nf", - "nfsnf(nf,x): if x=[A,I,J], outputs [c_1,...c_n] Smith normal form of x", - "nfsolvemodpr(nf,a,b,pr): solution of a*x=b in Z_K/pr, where a is a matrix and b a column vector, and where pr is in modpr format (see nfmodprinit)", - "nfsubfields(nf,{d=0}): find all subfields of degree d of number field nf (all subfields if d is null or omitted). Result is a vector of subfields, each being given by [g,h], where g is an absolute equation and h expresses one of the roots of g in terms of the root x of the polynomial defining nf", - "norm(x): norm of x", - "norml2(x): square of the L2-norm of the vector x", - "numbpart(x): number of partitions of x", - "numdiv(x): number of divisors of x", - "numerator(x): numerator of x", - "numtoperm(n,k): permutation number k (mod n!) of n letters (n C-integer)", - "omega(x): number of distinct prime divisors of x", - "padicappr(x,a): p-adic roots of the polynomial x congruent to a mod p", - "padicprec(x,p): absolute p-adic precision of object x", - "permtonum(vect): ordinal (between 1 and n!) of permutation vect", - "polcoeff(x,s,{v}): coefficient of degree s of x, or the s-th component for vectors or matrices (for which it is simpler to use x[]). With respect to the main variable if v is omitted, with respect to the variable v otherwise", - "polcompositum(pol1,pol2,{flag=0}): vector of all possible compositums of the number fields defined by the polynomials pol1 and pol2. If (optional) flag is set (i.e non-null), output for each compositum, not only the compositum polynomial pol, but a vector [pol,al1,al2,k] where al1 (resp. al2) is a root of pol1 (resp. pol2) expressed as a polynomial modulo pol, and a small integer k such that al2+k*al1 is the chosen root of pol", - "polcyclo(n,{v=x}): n-th cyclotomic polynomial (in variable v)", - "poldegree(x,{v}): degree of the polynomial or rational function x with respect to main variable if v is omitted, with respect to v otherwise. Return -1 if x = 0, and 0 if it's a non-zero scalar", - "poldisc(x,{v}): discriminant of the polynomial x, with respect to main variable if v is omitted, with respect to v otherwise", - "poldiscreduced(f): vector of elementary divisors of Z[a]/f'(a)Z[a], where a is a root of the polynomial f", - "polgalois(x): Galois group of the polynomial x (see manual for group coding)", - "polhensellift(x, y, p, e): lift the factorization y of x modulo p to a factorization modulo p^e using Hensel lift. The factors in y must be pairwise relatively prime modulo p", - "polinterpolate(xa,{ya},{x},{&e}): polynomial interpolation at x according to data vectors xa, ya (ie return P such that P(xa[i]) = ya[i] for all i). If ya is omitter, return P such that P(i) = xa[i]. If present, e will contain an error estimate on the returned value", - "polisirreducible(x): true(1) if x is an irreducible non-constant polynomial, false(0) if x is reducible or constant", - "pollead(x,{v}): leading coefficient of polynomial or series x, or x itself if x is a scalar. Error otherwise. With respect to the main variable of x if v is omitted, with respect to the variable v otherwise", - "pollegendre(n,{v=x}): legendre polynomial of degree n (n C-integer), in variable v", - "polrecip(x): reciprocal polynomial of x", - "polred(x,{flag=0},{p}): reduction of the polynomial x (gives minimal polynomials only). Second and third args are optional. The following binary digits of flag are significant 1: partial reduction, 2: gives also elements. p, if present, contains the complete factorization matrix of the discriminant", - "polredabs(x,{flag=0}): a smallest generating polynomial of the number field for the T2 norm on the roots, with smallest index for the minimal T2 norm. flag is optional, whose binary digit mean 1: give the element whose characteristic polynomial is the given polynomial. 4: give all polynomials of minimal T2 norm (give only one of P(x) and P(-x)). 16: partial reduction", - "polredord(x): reduction of the polynomial x, staying in the same order", - "polresultant(x,y,{v},{flag=0}): resultant of the polynomials x and y, with respect to the main variables of x and y if v is omitted, with respect to the variable v otherwise. flag is optional, and can be 0: default, assumes that the polynomials have exact entries (uses the subresultant algorithm), 1 for arbitrary polynomials, using Sylvester's matrix, or 2: using a Ducos's modified subresultant algorithm", - "polroots(x,{flag=0}): complex roots of the polynomial x. flag is optional, and can be 0: default, uses Schonhage's method modified by Gourdon, or 1: uses a modified Newton method", - "polrootsmod(x,p,{flag=0}): roots mod p of the polynomial x. flag is optional, and can be 0: default, or 1: use a naive search, useful for small p", - "polrootspadic(x,p,r): p-adic roots of the polynomial x to precision r", - "polsturm(x,{a},{b}): number of real roots of the polynomial x in the interval]a,b] (which are respectively taken to be -oo or +oo when omitted)", - "polsubcyclo(n,d,{v=x}): finds an equation (in variable v) for the d-th degree subfields of Q(zeta_n). Output is a polynomial or a vector of polynomials is there are several such fields, or none.", - "polsylvestermatrix(x,y): forms the sylvester matrix associated to the two polynomials x and y. Warning: the polynomial coefficients are in columns, not in rows", - "polsym(x,n): vector of symmetric powers of the roots of x up to n", - "poltchebi(n,{v=x}): Tchebitcheff polynomial of degree n (n C-integer), in variable v", - "poltschirnhaus(x): random Tschirnhausen transformation of the polynomial x", - "polylog(m,x,{flag=0}): m-th polylogarithm of x. flag is optional, and can be 0: default, 1: D_m~-modified m-th polylog of x, 2: D_m-modified m-th polylog of x, 3: P_m-modified m-th polylog of x", - "polzagier(n,m): Zagier's polynomials of index n,m", - "precision(x,{n}): change the precision of x to be n (n C-integer). If n is omitted, output real precision of object x", - "precprime(x): largest prime number<=x, 0 if x<=1", - "prime(n): returns the n-th prime (n C-integer)", - "primes(n): returns the vector of the first n primes (n C-integer)", - "prod(X=a,b,expr,{x=1}): x times the product (X runs from a to b) of expression", - "prodeuler(X=a,b,expr): Euler product (X runs over the primes between a and b) of real or complex expression", - "prodinf(X=a,expr,{flag=0}): infinite product (X goes from a to infinity) of real or complex expression. flag can be 0 (default) or 1, in which case compute the product of the 1+expr instead", - "psi(x): psi-function at x", - "qfbclassno(x,{flag=0}): class number of discriminant x using Shanks's method by default. If (optional) flag is set to 1, use Euler products", - "qfbcompraw(x,y): Gaussian composition without reduction of the binary quadratic forms x and y", - "qfbhclassno(x): Hurwitz-Kronecker class number of x>0", - "qfbnucomp(x,y,l): composite of primitive positive definite quadratic forms x and y using nucomp and nudupl, where l=[|D/4|^(1/4)] is precomputed", - "qfbnupow(x,n): n-th power of primitive positive definite quadratic form x using nucomp and nudupl", - "qfbpowraw(x,n): n-th power without reduction of the binary quadratic form x", - "qfbprimeform(x,p): returns the prime form of discriminant x, whose first coefficient is p", - "qfbred(x,{flag=0},{D},{isqrtD},{sqrtD}): reduction of the binary quadratic form x. All other args. are optional. D, isqrtD and sqrtD, if present, supply the values of the discriminant, floor(sqrt(D)) and sqrt(D) respectively. If D<0, its value is not used and all references to Shanks's distance hereafter are meaningless. flag can be any of 0: default, uses Shanks's distance function d; 1: use d, do a single reduction step; 2: do not use d; 3: do not use d, single reduction step. ", - "qfgaussred(x): square reduction of the (symmetric) matrix x (returns a square matrix whose i-th diagonal term is the coefficient of the i-th square in which the coefficient of the i-th variable is 1)", - "qfjacobi(x): eigenvalues and orthogonal matrix of eigenvectors of the real symmetric matrix x", - "qflll(x,{flag=0}): LLL reduction of the vectors forming the matrix x (gives the unimodular transformation matrix). flag is optional, and can be 0: default, 1: lllint algorithm for integer matrices, 2: lllintpartial algorithm for integer matrices, 4: lllkerim giving the kernel and the LLL reduced image, 5: lllkerimgen same but if the matrix has polynomial coefficients, 8: lllgen, same as qflll when the coefficients are polynomials", - "qflllgram(x,{flag=0}): LLL reduction of the lattice whose gram matrix is x (gives the unimodular transformation matrix). flag is optional and can be 0: default,1: lllgramint algorithm for integer matrices, 4: lllgramkerim giving the kernel and the LLL reduced image, 5: lllgramkerimgen same when the matrix has polynomial coefficients, 8: lllgramgen, same as qflllgram when the coefficients are polynomials", - "qfminim(x,bound,maxnum,{flag=0}): number of vectors of square norm <= bound, maximum norm and list of vectors for the integral and definite quadratic form x; minimal non-zero vectors if bound=0. flag is optional, and can be 0: default; 1: returns the first minimal vector found (ignore maxnum); 2: as 0 but use Fincke-Pohst (valid for non integral quadratic forms)", - "qfperfection(a): rank of matrix of xx~ for x minimal vectors of a gram matrix a", - "qfsign(x): signature of the symmetric matrix x", - "quadclassunit(D,{flag=0},{tech=[]}): compute the structure of the class group and the regulator of the quadratic field of discriminant D. If flag is non-null (and D>0), compute the narrow class group. See manual for the optional technical parameters", - "quaddisc(x): discriminant of the quadratic field Q(sqrt(x))", - "quadgen(x): standard generator of quadratic order of discriminant x", - "quadhilbert(D,{flag=0}): relative equation for the Hilbert class field of the quadratic field of discriminant D (which can also be a bnf). If flag is a non-zero integer and D<0, list of [form,root(form)] (used for contructing subfields). If D<0, flag can also be a 2-component vector [p,q], where p,q are the prime numbers needed for Schertz's method. In that case, return 0 if [p,q] not suitable. If D>0 and flag is non-zero, try hard to find the best modulus", - "quadpoly(D,{v=x}): quadratic polynomial corresponding to the discriminant D, in variable v", - "quadray(D,f,{flag=0}): relative equation for the ray class field of conductor f for the quadratic field of discriminant D (which can also be a bnf). For D < 0, flag has the following meaning: if flag is an odd integer, output instead the vector of [ideal,corresponding root]. It can also be a two component vector [lambda,flag], where flag is as above and lambda is the technical element of bnf necessary for Schertz's method. In that case, return 0 if lambda is not suitable. For D > 0, if flag is non-zero, try hard to find the best modulus", - "quadregulator(x): regulator of the real quadratic field of discriminant x", - "quadunit(x): fundamental unit of the quadratic field of discriminant x where x must be positive", - "random({N=2^31}): random integer between 0 and N-1", - "real(x): real part of x", - "removeprimes({x=[]}): remove primes in the vector x (with at most 100 components) from the prime table. x can also be a single integer. List the current extra primes if x is omitted", - "reorder({x=[]}): reorder the variables for output according to the vector x. If x is void or omitted, print the current list of variables", - "return({x=0}): return from current subroutine with result x", - "rnfalgtobasis(rnf,x): relative version of nfalgtobasis, where rnf is a relative numberfield", - "rnfbasis(bnf,order): given an order as output by rnfpseudobasis or rnfsteinitz, gives either a basis of the order if it is free, or an n+1-element generating set", - "rnfbasistoalg(rnf,x): relative version of nfbasistoalg, where rnf is a relative numberfield", - "rnfcharpoly(nf,T,alpha,{var=x}): characteristic polynomial of alpha over nf, where alpha belongs to the algebra defined by T over nf. Returns a polynomial in variable var (x by default)", - "rnfconductor(bnf,polrel,{flag=0}): conductor of the Abelian extension of bnf defined by polrel. The result is [conductor,rayclassgroup,subgroup], where conductor is the conductor itself, rayclassgroup the structure of the corresponding full ray class group, and subgroup the HNF defining the norm group (Artin or Takagi group) on the given generators rayclassgroup[3]. If flag is non-zero, check (under GRH) that polrel indeed defines an Abelian extension", - "rnfdedekind(nf,T,pr): relative Dedekind criterion over nf, applied to the order defined by a root of irreducible polynomial T, modulo the prime ideal pr. Returns [flag,basis,val], where basis is a pseudo-basis of the enlarged order, flag is 1 iff this order is pr-maximal, and val is the valuation in pr of the order discriminant", - "rnfdet(nf,order): given a pseudomatrix, compute its pseudodeterminant", - "rnfdisc(nf,pol): given a pol with coefficients in nf, gives a 2-component vector [D,d], where D is the relative ideal discriminant, and d is the relative discriminant in nf^*/nf*^2", - "rnfeltabstorel(rnf,x): transforms the element x from absolute to relative representation", - "rnfeltdown(rnf,x): expresses x on the base field if possible; returns an error otherwise", - "rnfeltreltoabs(rnf,x): transforms the element x from relative to absolute representation", - "rnfeltup(rnf,x): expresses x (belonging to the base field) on the relative field", - "rnfequation(nf,pol,{flag=0}): given a pol with coefficients in nf, gives the absolute equation apol of the number field defined by pol. flag is optional, and can be 0: default, or non-zero, gives [apol,th], where th expresses the root of nf.pol in terms of the root of apol", - "rnfhnfbasis(bnf,order): given an order as output by rnfpseudobasis, gives either a true HNF basis of the order if it exists, zero otherwise", - "rnfidealabstorel(rnf,x): transforms the ideal x from absolute to relative representation", - "rnfidealdown(rnf,x): finds the intersection of the ideal x with the base field", - "rnfidealhnf(rnf,x): relative version of idealhnf, where rnf is a relative numberfield", - "rnfidealmul(rnf,x,y): relative version of idealmul, where rnf is a relative numberfield", - "rnfidealnormabs(rnf,x): absolute norm of the ideal x", - "rnfidealnormrel(rnf,x): relative norm of the ideal x", - "rnfidealreltoabs(rnf,x): transforms the ideal x from relative to absolute representation", - "rnfidealtwoelt(rnf,x): relative version of idealtwoelement, where rnf is a relative numberfield", - "rnfidealup(rnf,x): lifts the ideal x (of the base field) to the relative field", - "rnfinit(nf,pol): pol being a non constant irreducible polynomial defined over the number field nf, initializes a vector of data necessary for working in relative number fields (rnf functions). See manual for technical details", - "rnfisfree(bnf,order): given an order as output by rnfpseudobasis or rnfsteinitz, outputs true (1) or false (0) according to whether the order is free or not", - "rnfisnorm(T,x,{flag=0}): T is as output by rnfisnorminit applied to L/K. Tries to tell whether x is a norm from L/K. Returns a vector [a,b] where x=Norm(a)*b. Looks for a solution which is a S-integer, with S a list of places in K containing the ramified primes, generators of the class group of ext, as well as those primes dividing x. If L/K is Galois, omit flag, otherwise it is used to add more places to S: all the places above the primes p <= flag (resp. p | flag) if flag > 0 (resp. flag < 0). The answer is guaranteed (i.e x norm iff b=1) if L/K is Galois or, under GRH, if S contains all primes less than 12.log(disc(M))^2, where M is the normal closure of L/K", - "rnfisnorminit(pol,polrel,{flag=2}): let K be defined by a root of pol, L/K the extension defined by polrel. Compute technical data needed by rnfisnorm to solve norm equations Nx = a, for x in L, and a in K. If flag=0, do not care whether L/K is Galois or not; if flag = 1, assume L/K is Galois; if flag = 2, determine whether L/K is Galois", - "rnfkummer(bnr,{subgroup},{deg=0}): bnr being as output by bnrinit, finds a relative equation for the class field corresponding to the module in bnr and the given congruence subgroup (the ray class field if subgroup is omitted). deg can be zero (default), or positive, and in this case the output is the list of all relative equations of degree deg for the given bnr", - "rnflllgram(nf,pol,order): given a pol with coefficients in nf and an order as output by rnfpseudobasis or similar, gives [[neworder],U], where neworder is a reduced order and U is the unimodular transformation matrix", - "rnfnormgroup(bnr,polrel): norm group (or Artin or Takagi group) corresponding to the Abelian extension of bnr.bnf defined by polrel, where the module corresponding to bnr is assumed to be a multiple of the conductor. The result is the HNF defining the norm group on the given generators in bnr[5][3]", - "rnfpolred(nf,pol): given a pol with coefficients in nf, finds a list of relative polynomials defining some subfields, hopefully simpler", - "rnfpolredabs(nf,pol,{flag=0}): given a pol with coefficients in nf, finds a relative simpler polynomial defining the same field. Binary digits of flag mean: 1: return also the element whose characteristic polynomial is the given polynomial, 2: return an absolute polynomial, 16: partial reduction", - "rnfpseudobasis(nf,pol): given a pol with coefficients in nf, gives a 4-component vector [A,I,D,d] where [A,I] is a pseudo basis of the maximal order in HNF on the power basis, D is the relative ideal discriminant, and d is the relative discriminant in nf^*/nf*^2", - "rnfsteinitz(nf,order): given an order as output by rnfpseudobasis, gives [A,I,D,d] where (A,I) is a pseudo basis where all the ideals except perhaps the last are trivial", - "round(x,{&e}): take the nearest integer to all the coefficients of x. If e is present, do not take into account loss of integer part precision, and set e = error estimate in bits", - "serconvol(x,y): convolution (or Hadamard product) of two power series", - "serlaplace(x): replaces the power series sum of a_n*x^n/n! by sum of a_n*x^n. For the reverse operation, use serconvol(x,exp(X))", - "serreverse(x): reversion of the power series x", - "setintersect(x,y): intersection of the sets x and y", - "setisset(x): true(1) if x is a set (row vector with strictly increasing entries), false(0) if not", - "setminus(x,y): set of elements of x not belonging to y", - "setrand(n): reset the seed of the random number generator to n", - "setsearch(x,y,{flag=0}): looks if y belongs to the set x. If flag is 0 or omitted, returns 0 if it is not, otherwise returns the index j such that y==x[j]. If flag is non-zero, return 0 if y belongs to x, otherwise the index j where it should be inserted", - "setunion(x,y): union of the sets x and y", - "shift(x,n,{flag=0}): shift x left n bits if n>=0, right -n bits if n<0. If flag is true and n is negative, will treat negative integer x as if modulo big power of 2, otherwise sign of x is ignored but preserved", - "shiftmul(x,n): multiply x by 2^n (n>=0 or n<0)", - "sigma(x,{k=1}): sum of the k-th powers of the divisors of x. k is optional and if omitted is assumed to be equal to 1", - "sign(x): sign of x, of type integer, real or fraction", - "simplify(x): simplify the object x as much as possible", - "sin(x): sine of x", - "sinh(x): hyperbolic sine of x", - "sizebyte(x): number of bytes occupied by the complete tree of the object x", - "sizedigit(x): maximum number of decimal digits minus one of (the coefficients of) x", - "solve(X=a,b,expr): real root of expression expr (X between a and b), where expr(a)*expr(b)<=0", - "sqr(x): square of x. NOT identical to x*x", - "sqrt(x): square root of x", - "sqrtint(x): integer square root of x (x integer)", - "sqrtn(x,n,{&z}): nth-root of x, n must be integer. If present, z is set to a suitable root of unity to recover all solutions. If it was not possible, z is set to zero", - "subgrouplist(bnr,{bound},{flag=0}): bnr being as output by bnrinit or a list of cyclic components of a finite Abelian group G, outputs the list of subgroups of G (of index bounded by bound, if not omitted), given as HNF left divisors of the SNF matrix corresponding to G. If flag=0 (default) and bnr is as output by bnrinit, gives only the subgroups for which the modulus is the conductor", - "subst(x,y,z): in expression x, replace the variable y by the expression z", - "sum(X=a,b,expr,{x=0}): x plus the sum (X goes from a to b) of expression expr", - "sumalt(X=a,expr,{flag=0}): Cohen-Villegas-Zagier's acceleration of alternating series expr, X starting at a. flag is optional, and can be 0: default, or 1: uses a slightly different method using Zagier's polynomials", - "sumdiv(n,X,expr): sum of expression expr, X running over the divisors of n", - "suminf(X=a,expr): infinite sum (X goes from a to infinity) of real or complex expression expr", - "sumpos(X=a,expr,{flag=0}): sum of positive series expr, the formal variable X starting at a. flag is optional, and can be 0: default, or 1: uses a slightly different method using Zagier's polynomials", - "tan(x): tangent of x", - "tanh(x): hyperbolic tangent of x", - "taylor(x,y): taylor expansion of x with respect to the main variable of y", - "teichmuller(x): teichmuller character of p-adic number x", - "theta(q,z): Jacobi sine theta-function", - "thetanullk(q,k): k'th derivative at z=0 of theta(q,z)", - "thue(tnf,a,{sol}): solve the equation P(x,y)=a, where tnf was created with thueinit(P), and sol, if present, contains the solutions of Norm(x)=a modulo units in the number field defined by P. If tnf was computed without assuming GRH (flag 1 in thueinit), the result is unconditional", - "thueinit(P,{flag=0}): initialize the tnf corresponding to P, that will be used to solve Thue equations P(x,y) = some-integer. If flag is non-zero, certify the result unconditionnaly. Otherwise, assume GRH (much faster of course)", - "trace(x): trace of x", - "truncate(x,{&e}): truncation of x; when x is a power series,take away the O(X^). If e is present, do not take into account loss of integer part precision, and set e = error estimate in bits", - "until(a,seq): evaluate the expression sequence seq until a is nonzero", - "valuation(x,p): valuation of x with respect to p", - "variable(x): main variable of object x. Gives p for p-adic x, error for scalars", - "vecextract(x,y,{z}): extraction of the components of the matrix or vector x according to y and z. If z is omitted, y designs columns, otherwise y corresponds to rows and z to columns. y and z can be vectors (of indices), strings (indicating ranges as in \"1..10\") or masks (integers whose binary representation indicates the indices to extract, from left to right 1, 2, 4, 8, etc.)", - "vecmax(x): maximum of the elements of the vector/matrix x", - "vecmin(x): minimum of the elements of the vector/matrix x", - "vecsort(x,{k},{flag=0}): sorts the vector of vectors (or matrix) x in ascending order, according to the value of its k-th component if k is not omitted. Binary digits of flag (if present) mean: 1: indirect sorting, return the permutation instead of the permuted vector, 2: sort using lexicographic order, 4: use descending instead of ascending order", - "vector(n,{X},{expr=0}): row vector with n components of expression expr (X ranges from 1 to n). By default, fill with 0s", - "vectorsmall(n,{X},{expr=0}): VECSMALL with n components of expression expr (X ranges from 1 to n) which must be small integers. By default, fill with 0s", - "vectorv(n,{X},{expr=0}): column vector with n components of expression expr (X ranges from 1 to n). By default, fill with 0s", - "weber(x,{flag=0}): One of Weber's f function of x. flag is optional, and can be 0: default, function f(x)=exp(-i*Pi/24)*eta((x+1)/2)/eta(x) such that (j=(f^24-16)^3/f^24), 1: function f1(x)=eta(x/2)/eta(x) such that (j=(f1^24+16)^3/f2^24), 2: function f2(x)=sqrt(2)*eta(2*x)/eta(x) such that (j=(f2^24+16)^3/f2^24)", - "while(a,seq): while a is nonzero evaluate the expression sequence seq. Otherwise 0", - "zeta(s): Riemann zeta function at s", - "zetak(nfz,s,{flag=0}): Dedekind zeta function of the number field nfz at s, where nfz is the vector computed by zetakinit (NOT by nfinit) flag is optional, and can be 0: default, compute zetak, or non-zero: compute the lambdak function, i.e. with the gamma factors", - "zetakinit(x): compute number field information necessary to use zetak, where x is an irreducible polynomial", - "znlog(x,g): g as output by znprimroot (modulo a prime). Return smallest positive n such that g^n = x", - "znorder(x): order of the integermod x in (Z/nZ)*", - "znprimroot(n): returns a primitive root of n when it exists", - "znstar(n): 3-component vector v, giving the structure of (Z/nZ)^*. v[1] is the order (i.e. eulerphi(n)), v[2] is a vector of cyclic components, and v[3] is a vector giving the corresponding generators", - -/* DO NOT REMOVE THIS BLANK LINE: chname & helpsynchro depend on it */ -}; - Index: src/language/init.c =================================================================== RCS file: /home/megrez/cvsroot/pari/src/language/init.c,v retrieving revision 1.202 diff -u -r1.202 init.c --- src/language/init.c 2003/06/11 15:32:40 1.202 +++ src/language/init.c 2003/06/17 12:05:38 @@ -2126,481 +2126,4 @@ * Any other valence (what to do with 0?) should correspond to exactly * one code. */ -entree functions_basic[]={ -{"Euler",0,(void*)mpeuler,3,"p"}, -{"I",0,(void*)geni,3,""}, -{"List",0,(void*)gtolist,2,"DG"}, -{"Mat",0,(void*)gtomat,2,"DG"}, -{"Mod",25,(void*)Mod0,2,"GGD0,L,"}, -{"O",50,NULL,7,NULL}, -{"Pi",0,(void*)mppi,3,"p"}, -{"Pol",14,(void*)gtopoly,2,"GDn"}, -{"Polrev",14,(void*)gtopolyrev,2,"GDn"}, -{"Qfb",99,(void*)Qfb0,2,"GGGDGp"}, -{"Ser",14,(void*)gtoser,2,"GDn"}, -{"Set",0,(void*)gtoset,2,"DG"}, -{"Str",0,(void*)Str,2,"s*"}, -{"Strexpand",0,(void*)Strexpand,2,"s*"}, -{"Strtex",0,(void*)Strtex,2,"s*"}, -{"Vec",0,(void*)gtovec,2,"DG"}, -{"Vecsmall",0,(void*)gtovecsmall,2,"DG"}, -{"abs",1,(void*)gabs,3,"Gp"}, -{"acos",1,(void*)gacos,3,"Gp"}, -{"acosh",1,(void*)gach,3,"Gp"}, -{"addprimes",0,(void*)addprimes,4,"DG"}, -{"agm",29,(void*)agm,3,"GGp"}, -{"algdep",99,(void*)algdep0,8,"GLD0,L,p"}, -{"alias",99,(void*)alias0,11,"vrr"}, -{"arg",1,(void*)garg,3,"Gp"}, -{"asin",1,(void*)gasin,3,"Gp"}, -{"asinh",1,(void*)gash,3,"Gp"}, -{"atan",1,(void*)gatan,3,"Gp"}, -{"atanh",1,(void*)gath,3,"Gp"}, -{"bernfrac",11,(void*)bernfrac,3,"L"}, -{"bernreal",99,(void*)bernreal,3,"Lp"}, -{"bernvec",11,(void*)bernvec,3,"L"}, -{"besselh1",29,(void*)hbessel1,3,"GGp"}, -{"besselh2",29,(void*)hbessel2,3,"GGp"}, -{"besseli",29,(void*)ibessel,3,"GGp"}, -{"besselj",29,(void*)jbessel,3,"GGp"}, -{"besseljh",29,(void*)jbesselh,3,"GGp"}, -{"besselk",99,(void*)kbessel0,3,"GGD0,L,p"}, -{"besseln",29,(void*)nbessel,3,"GGp"}, -{"bestappr",99,(void*)bestappr0,4,"GGDG"}, -{"bezout",2,(void*)vecbezout,4,"GG"}, -{"bezoutres",2,(void*)vecbezoutres,4,"GG"}, -{"bigomega",18,(void*)gbigomega,4,"G"}, -{"binary",18,(void*)binaire,2,"G"}, -{"binomial",21,(void*)binome,4,"GL"}, -{"bitand",2,(void*)gbitand,2,"GG"}, -{"bitneg",99,(void*)gbitneg,2,"GD-1,L,"}, -{"bitnegimply",2,(void*)gbitnegimply,2,"GG"}, -{"bitor",2,(void*)gbitor,2,"GG"}, -{"bittest",99,(void*)gbittest3,2,"GGD1,L,"}, -{"bitxor",2,(void*)gbitxor,2,"GG"}, -{"bnfcertify",10,(void*)certifybuchall,6,"lG"}, -{"bnfclassunit",99,(void*)bnfclassunit0,6,"GD0,L,DGp"}, -{"bnfclgp",99,(void*)classgrouponly,6,"GDGp"}, -{"bnfdecodemodule",2,(void*)decodemodule,6,"GG"}, -{"bnfinit",91,(void*)bnfinit0,6,"GD0,L,DGp"}, -{"bnfisintnorm",99,(void*)bnfisintnorm,6,"GG"}, -{"bnfisnorm",99,(void*)bnfisnorm,6,"GGD1,L,p"}, -{"bnfisprincipal",99,(void*)isprincipalall,6,"GGD1,L,"}, -{"bnfissunit",99,(void*)bnfissunit,6,"GGG"}, -{"bnfisunit",2,(void*)isunit,6,"GG"}, -{"bnfmake",1,(void*)bnfmake,6,"Gp"}, -{"bnfnarrow",18,(void*)buchnarrow,6,"G"}, -{"bnfreg",99,(void*)regulator,6,"GDGp"}, -{"bnfsignunit",18,(void*)signunits,6,"G"}, -{"bnfsunit",99,(void*)bnfsunit,6,"GGp"}, -{"bnfunit",18,(void*)buchfu,6,"G"}, -{"bnrL1",99,(void*)bnrL1,6,"GDGD0,L,p"}, -{"bnrclass",99,(void*)bnrclass0,6,"GGD0,L,"}, -{"bnrclassno",2,(void*)rayclassno,6,"GG"}, -{"bnrclassnolist",2,(void*)rayclassnolist,6,"GG"}, -{"bnrconductor",99,(void*)bnrconductor,6,"GDGDGDG"}, -{"bnrconductorofchar",2,(void*)bnrconductorofchar,6,"GG"}, -{"bnrdisc",99,(void*)bnrdisc0,6,"GDGDGD0,L,"}, -{"bnrdisclist",99,(void*)bnrdisclist0,6,"GGDGD0,L,"}, -{"bnrinit",99,(void*)bnrinit0,6,"GGD0,L,"}, -{"bnrisconductor",99,(void*)bnrisconductor,6,"lGDGDG"}, -{"bnrisprincipal",99,(void*)isprincipalrayall,6,"GGD1,L,"}, -{"bnrrootnumber",99,(void*)bnrrootnumber,6,"GGD0,L,p"}, -{"bnrstark",99,(void*)bnrstark,6,"GDGD0,L,p"}, -{"break",0,(void*)break0,11,"D1,L,"}, -{"ceil",18,(void*)gceil,2,"G"}, -{"centerlift",99,(void*)centerlift0,2,"GDn"}, -{"changevar",2,(void*)changevar,2,"GG"}, -{"charpoly",99,(void*)charpoly0,8,"GDnD0,L,"}, -{"chinese",99,(void*)chinese,4,"GDG"}, -{"component",21,(void*)compo,2,"GL"}, -{"concat",99,(void*)concat,8,"GDG"}, -{"conj",18,(void*)gconj,2,"G"}, -{"conjvec",1,(void*)conjvec,2,"Gp"}, -{"content",18,(void*)content,4,"G"}, -{"contfrac",99,(void*)contfrac0,4,"GDGD0,L,"}, -{"contfracpnqn",18,(void*)pnqn,4,"G"}, -{"core",99,(void*)core0,4,"GD0,L,"}, -{"coredisc",99,(void*)coredisc0,4,"GD0,L,"}, -{"cos",1,(void*)gcos,3,"Gp"}, -{"cosh",1,(void*)gch,3,"Gp"}, -{"cotan",1,(void*)gcotan,3,"Gp"}, -{"denominator",18,(void*)denom,2,"G"}, -{"deriv",14,(void*)deriv,7,"GDn"}, -{"dilog",1,(void*)dilog,3,"Gp"}, -{"dirdiv",2,(void*)dirdiv,4,"GG"}, -{"direuler",99,(void*)direulerall,4,"V=GGEDG"}, -{"dirmul",2,(void*)dirmul,4,"GG"}, -{"dirzetak",2,(void*)dirzetak,6,"GG"}, -{"divisors",18,(void*)divisors,4,"G"}, -{"divrem",99,(void*)divrem,1,"GGDn"}, -{"eint1",99,(void*)veceint1,3,"GDGp"}, -{"elladd",3,(void*)addell,5,"GGG"}, -{"ellak",2,(void*)akell,5,"GG"}, -{"ellan",23,(void*)anell,5,"GL"}, -{"ellap",25,(void*)ellap0,5,"GGD0,L,"}, -{"ellbil",99,(void*)bilhell,5,"GGGp"}, -{"ellchangecurve",2,(void*)coordch,5,"GG"}, -{"ellchangepoint",2,(void*)pointch,5,"GG"}, -{"elleisnum",99,(void*)elleisnum,5,"GLD0,L,p"}, -{"elleta",1,(void*)elleta,5,"Gp"}, -{"ellglobalred",18,(void*)globalreduction,5,"G"}, -{"ellheight",99,(void*)ellheight0,5,"GGD2,L,p"}, -{"ellheightmatrix",29,(void*)mathell,5,"GGp"}, -{"ellinit",99,(void*)ellinit0,5,"GD0,L,p"}, -{"ellisoncurve",20,(void*)oncurve,5,"lGG"}, -{"ellj",1,(void*)jell,5,"Gp"}, -{"elllocalred",2,(void*)localreduction,5,"GG"}, -{"elllseries",99,(void*)lseriesell,5,"GGDGp"}, -{"ellminimalmodel",99,(void*)ellminimalmodel,5,"GD&"}, -{"ellorder",2,(void*)orderell,5,"GG"}, -{"ellordinate",29,(void*)ordell,5,"GGp"}, -{"ellpointtoz",29,(void*)zell,5,"GGp"}, -{"ellpow",99,(void*)powell,5,"GGG"}, -{"ellrootno",99,(void*)ellrootno,5,"lGDG"}, -{"ellsigma",99,(void*)ellsigma,5,"GGD0,L,p"}, -{"ellsub",99,(void*)subell,5,"GGG"}, -{"elltaniyama",18,(void*)taniyama,5,"G"}, -{"elltors",99,(void*)elltors0,5,"GD0,L,"}, -{"ellwp",99,(void*)ellwp0,5,"GDGD0,L,pP"}, -{"ellzeta",99,(void*)ellzeta,5,"GGp"}, -{"ellztopoint",29,(void*)pointell,5,"GGp"}, -{"erfc",1,(void*)gerfc,3,"Gp"}, -{"eta",99,(void*)eta0,3,"GD0,L,p"}, -{"eulerphi",18,(void*)gphi,4,"G"}, -{"eval",18,(void*)geval,7,"G"}, -{"exp",1,(void*)gexp,3,"Gp"}, -{"factor",99,(void*)factor0,4,"GD-1,L,"}, -{"factorback",99,(void*)factorback0,4,"GDGDG"}, -{"factorcantor",2,(void*)factcantor,4,"GG"}, -{"factorff",3,(void*)factmod9,4,"GGG"}, -{"factorial",99,(void*)mpfactr,4,"Lp"}, -{"factorint",99,(void*)factorint,4,"GD0,L,"}, -{"factormod",25,(void*)factormod0,4,"GGD0,L,"}, -{"factornf",2,(void*)polfnf,6,"GG"}, -{"factorpadic",99,(void*)factorpadic0,7,"GGLD0,L,"}, -{"ffinit",99,(void*)ffinit,4,"GLDn"}, -{"fibonacci",11,(void*)fibo,4,"L"}, -{"floor",18,(void*)gfloor,2,"G"}, -{"for",83,(void*)forpari,11,"vV=GGI"}, -{"fordiv",84,(void*)fordiv,11,"vGVI"}, -{"forprime",83,(void*)forprime,11,"vV=GGI"}, -{"forstep",86,(void*)forstep,11,"vV=GGGI"}, -{"forsubgroup",99,(void*)forsubgroup,11,"vV=GDGI"}, -{"forvec",87,(void*)forvec,11,"vV=GID0,L,"}, -{"frac",18,(void*)gfrac,2,"G"}, -{"galoisexport",99,(void*)galoisexport,6,"GD0,L,"}, -{"galoisfixedfield",99,(void*)galoisfixedfield,6,"GGD0,L,Dn"}, -{"galoisidentify",18,(void*)galoisidentify,6,"G"}, -{"galoisinit",99,(void*)galoisinit,6,"GDGD0,L,"}, -{"galoisisabelian",99,(void*)galoisisabelian,6,"GD0,L,"}, -{"galoispermtopol",2,(void*)galoispermtopol,6,"GG"}, -{"galoissubcyclo",99,(void*)galoissubcyclo,6,"GDGD0,L,Dn"}, -{"galoissubfields",99,(void*)galoissubfields,6,"GD0,L,Dn"}, -{"galoissubgroups",18,(void*)galoissubgroups,6,"G"}, -{"gamma",1,(void*)ggamma,3,"Gp"}, -{"gammah",1,(void*)ggamd,3,"Gp"}, -{"gcd",99,(void*)gcd0,4,"GDGD0,L,"}, -{"getheap",0,(void*)getheap,11,""}, -{"getrand",0,(void*)getrand,11,"l"}, -{"getstack",0,(void*)getstack,11,"l"}, -{"gettime",0,(void*)gettime,11,"l"}, -{"hilbert",99,(void*)hil0,4,"lGGDG"}, -{"hyperu",99,(void*)hyperu,3,"GGGp"}, -{"idealadd",3,(void*)idealadd,6,"GGG"}, -{"idealaddtoone",99,(void*)idealaddtoone0,6,"GGDG"}, -{"idealappr",25,(void*)idealappr0,6,"GGD0,L,"}, -{"idealchinese",3,(void*)idealchinese,6,"GGG"}, -{"idealcoprime",3,(void*)idealcoprime,6,"GGG"}, -{"idealdiv",99,(void*)idealdiv0,6,"GGGD0,L,"}, -{"idealfactor",2,(void*)idealfactor,6,"GG"}, -{"idealhnf",99,(void*)idealhnf0,6,"GGDG"}, -{"idealintersect",3,(void*)idealintersect,6,"GGG"}, -{"idealinv",2,(void*)idealinv,6,"GG"}, -{"ideallist",99,(void*)ideallist0,6,"GLD4,L,"}, -{"ideallistarch",99,(void*)ideallistarch0,6,"GGDGD0,L,"}, -{"ideallog",3,(void*)zideallog,6,"GGG"}, -{"idealmin",99,(void*)minideal,6,"GGDGp"}, -{"idealmul",99,(void*)idealmul0,6,"GGGD0,L,p"}, -{"idealnorm",2,(void*)idealnorm,6,"GG"}, -{"idealpow",99,(void*)idealpow0,6,"GGGD0,L,p"}, -{"idealprimedec",2,(void*)primedec,6,"GG"}, -{"idealprincipal",2,(void*)principalideal,6,"GG"}, -{"idealred",99,(void*)ideallllred,6,"GGDGp"}, -{"idealstar",99,(void*)idealstar0,6,"GGD1,L,"}, -{"idealtwoelt",99,(void*)ideal_two_elt0,6,"GGDG"}, -{"idealval",30,(void*)idealval,6,"lGGG"}, -{"ideleprincipal",29,(void*)principalidele,6,"GGp"}, -{"if",80,NULL,11,NULL}, -{"imag",18,(void*)gimag,2,"G"}, -{"incgam",99,(void*)incgam0,3,"GGDGp"}, -{"incgamc",29,(void*)incgam3,3,"GGp"}, -{"intformal",14,(void*)integ,7,"GDn"}, -{"intnum",99,(void*)intnum0,9,"V=GGED0,L,p"}, -{"isfundamental",18,(void*)gisfundamental,4,"G"}, -{"isprime",99,(void*)gisprime,4,"GD0,L,"}, -{"ispseudoprime",99,(void*)gispseudoprime,4,"GD0,L,"}, -{"issquare",99,(void*)gcarrecomplet,4,"GD&"}, -{"issquarefree",18,(void*)gissquarefree,4,"G"}, -{"kronecker",2,(void*)gkronecker,4,"GG"}, -{"lcm",99,(void*)glcm0,4,"GDG"}, -{"length",10,(void*)glength,2,"lG"}, -{"lex",20,(void*)lexcmp,1,"lGG"}, -{"lift",99,(void*)lift0,2,"GDn"}, -{"lindep",99,(void*)lindep0,8,"GD0,L,p"}, -{"listcreate",11,(void*)listcreate,8,"L"}, -{"listinsert",99,(void*)listinsert,8,"GGL"}, -{"listkill",99,(void*)listkill,8,"vG"}, -{"listput",25,(void*)listput,8,"GGD0,L,"}, -{"listsort",99,(void*)listsort,8,"GD0,L,"}, -{"lngamma",1,(void*)glngamma,3,"Gp"}, -{"log",99,(void*)log0,99,"GD0,M,p\nAGM==1"}, -{"matadjoint",18,(void*)adj,8,"G"}, -{"matalgtobasis",2,(void*)matalgtobasis,6,"GG"}, -{"matbasistoalg",2,(void*)matbasistoalg,6,"GG"}, -{"matcompanion",18,(void*)assmat,8,"G"}, -{"matdet",99,(void*)det0,8,"GD0,L,"}, -{"matdetint",18,(void*)detint,8,"G"}, -{"matdiagonal",18,(void*)diagonal,8,"G"}, -{"mateigen",1,(void*)eigen,8,"Gp"}, -{"mathess",18,(void*)hess,8,"G"}, -{"mathilbert",11,(void*)mathilbert,8,"L"}, -{"mathnf",99,(void*)mathnf0,8,"GD0,L,"}, -{"mathnfmod",2,(void*)hnfmod,8,"GG"}, -{"mathnfmodid",2,(void*)hnfmodid,8,"GG"}, -{"matid",11,(void*)idmat,8,"L"}, -{"matimage",99,(void*)matimage0,8,"GD0,L,"}, -{"matimagecompl",18,(void*)imagecompl,8,"G"}, -{"matindexrank",18,(void*)indexrank,8,"G"}, -{"matintersect",2,(void*)intersect,8,"GG"}, -{"matinverseimage",2,(void*)inverseimage,8,"GG"}, -{"matisdiagonal",10,(void*)isdiagonal,8,"lG"}, -{"matker",99,(void*)matker0,8,"GD0,L,"}, -{"matkerint",99,(void*)matkerint0,8,"GD0,L,"}, -{"matmuldiagonal",2,(void*)matmuldiagonal,8,"GG"}, -{"matmultodiagonal",2,(void*)matmultodiagonal,8,"GG"}, -{"matpascal",99,(void*)matqpascal,8,"LDG"}, -{"matrank",10,(void*)rank,8,"lG"}, -{"matrix",49,(void*)matrice,8,"GGDVDVDI"}, -{"matrixqz",2,(void*)matrixqz0,8,"GG"}, -{"matsize",18,(void*)matsize,8,"G"}, -{"matsnf",99,(void*)matsnf0,8,"GD0,L,"}, -{"matsolve",2,(void*)gauss,8,"GG"}, -{"matsolvemod",99,(void*)matsolvemod0,8,"GGGD0,L,"}, -{"matsupplement",18,(void*)suppl,8,"G"}, -{"mattranspose",18,(void*)gtrans,8,"G"}, -{"max",2,(void*)gmax,1,"GG"}, -{"min",2,(void*)gmin,1,"GG"}, -{"modreverse",18,(void*)polymodrecip,6,"G"}, -{"moebius",18,(void*)gmu,4,"G"}, -{"newtonpoly",2,(void*)newtonpoly,6,"GG"}, -{"next",0,(void*)next0,11,"D1,L,"}, -{"nextprime",18,(void*)gnextprime,4,"G"}, -{"nfalgtobasis",2,(void*)algtobasis,6,"GG"}, -{"nfbasis",99,(void*)nfbasis0,6,"GD0,L,DG"}, -{"nfbasistoalg",2,(void*)basistoalg,6,"GG"}, -{"nfdetint",2,(void*)nfdetint,6,"GG"}, -{"nfdisc",99,(void*)nfdiscf0,6,"GD0,L,DG"}, -{"nfeltdiv",3,(void*)element_div,6,"GGG"}, -{"nfeltdiveuc",3,(void*)nfdiveuc,6,"GGG"}, -{"nfeltdivmodpr",4,(void*)element_divmodpr,6,"GGGG"}, -{"nfeltdivrem",3,(void*)nfdivres,6,"GGG"}, -{"nfeltmod",3,(void*)nfmod,6,"GGG"}, -{"nfeltmul",3,(void*)element_mul,6,"GGG"}, -{"nfeltmulmodpr",4,(void*)element_mulmodpr,6,"GGGG"}, -{"nfeltpow",3,(void*)element_pow,6,"GGG"}, -{"nfeltpowmodpr",4,(void*)element_powmodpr,6,"GGGG"}, -{"nfeltreduce",3,(void*)element_reduce,6,"GGG"}, -{"nfeltreducemodpr",3,(void*)nfreducemodpr,6,"GGG"}, -{"nfeltval",30,(void*)element_val,6,"lGGG"}, -{"nffactor",99,(void*)nffactor,6,"GG"}, -{"nffactormod",99,(void*)nffactormod,6,"GGG"}, -{"nfgaloisapply",3,(void*)galoisapply,6,"GGG"}, -{"nfgaloisconj",99,(void*)galoisconj0,6,"GD0,L,DGp"}, -{"nfhilbert",99,(void*)nfhilbert0,6,"lGGGDG"}, -{"nfhnf",2,(void*)nfhermite,6,"GG"}, -{"nfhnfmod",3,(void*)nfhermitemod,6,"GGG"}, -{"nfinit",99,(void*)nfinit0,6,"GD0,L,p"}, -{"nfisideal",20,(void*)isideal,6,"lGG"}, -{"nfisincl",2,(void*)nfisincl,6,"GG"}, -{"nfisisom",2,(void*)nfisisom,6,"GG"}, -{"nfkermodpr",3,(void*)nfkermodpr,6,"GGG"}, -{"nfmodprinit",2,(void*)nfmodprinit,6,"GG"}, -{"nfnewprec",1,(void*)nfnewprec,6,"Gp"}, -{"nfroots",99,(void*)nfroots,6,"DGG"}, -{"nfrootsof1",18,(void*)rootsof1,6,"G"}, -{"nfsnf",2,(void*)nfsmith,6,"GG"}, -{"nfsolvemodpr",4,(void*)nfsolvemodpr,6,"GGGG"}, -{"nfsubfields",99,(void*)subfields0,6,"GDG"}, -{"norm",18,(void*)gnorm,2,"G"}, -{"norml2",18,(void*)gnorml2,2,"G"}, -{"numbpart",18,(void*)numbpart,4,"G"}, -{"numdiv",18,(void*)gnumbdiv,4,"G"}, -{"numerator",18,(void*)numer,2,"G"}, -{"numtoperm",24,(void*)numtoperm,2,"LG"}, -{"omega",18,(void*)gomega,4,"G"}, -{"padicappr",2,(void*)apprgen9,7,"GG"}, -{"padicprec",20,(void*)padicprec,2,"lGG"}, -{"permtonum",18,(void*)permtonum,2,"G"}, -{"polcoeff",99,(void*)polcoeff0,7,"GLDn"}, -{"polcompositum",25,(void*)polcompositum0,6,"GGD0,L,"}, -{"polcyclo",99,(void*)cyclo,7,"LDn"}, -{"poldegree",99,(void*)poldegree,7,"lGDn"}, -{"poldisc",99,(void*)poldisc0,7,"GDn"}, -{"poldiscreduced",18,(void*)reduceddiscsmith,7,"G"}, -{"polgalois",99,(void*)galois,6,"Gp"}, -{"polhensellift",99,(void*)polhensellift,7,"GGGL"}, -{"polinterpolate",31,(void*)polint,7,"GDGDGD&"}, -{"polisirreducible",18,(void*)gisirreducible,7,"G"}, -{"pollead",99,(void*)pollead,7,"GDn"}, -{"pollegendre",99,(void*)legendre,7,"LDn"}, -{"polrecip",18,(void*)polrecip,7,"G"}, -{"polred",99,(void*)polred0,6,"GD0,L,DG"}, -{"polredabs",99,(void*)polredabs0,6,"GD0,L,"}, -{"polredord",18,(void*)ordred,6,"G"}, -{"polresultant",99,(void*)polresultant0,7,"GGDnD0,L,"}, -{"polroots",99,(void*)roots0,7,"GD0,L,p"}, -{"polrootsmod",25,(void*)rootmod0,7,"GGD0,L,"}, -{"polrootspadic",32,(void*)rootpadic,7,"GGL"}, -{"polsturm",99,(void*)sturmpart,7,"lGDGDG"}, -{"polsubcyclo",99,(void*)polsubcyclo,7,"LLDn"}, -{"polsylvestermatrix",2,(void*)sylvestermatrix,7,"GG"}, -{"polsym",21,(void*)polsym,7,"GL"}, -{"poltchebi",99,(void*)tchebi,7,"LDn"}, -{"poltschirnhaus",18,(void*)tschirnhaus,6,"G"}, -{"polylog",99,(void*)polylog0,3,"LGD0,L,p"}, -{"polzagier",99,(void*)polzag,7,"LL"}, -{"precision",99,(void*)precision0,2,"GD0,L,"}, -{"precprime",18,(void*)gprecprime,4,"G"}, -{"prime",11,(void*)prime,4,"L"}, -{"primes",11,(void*)primes,4,"L"}, -{"prod",47,(void*)produit,9,"V=GGEDG"}, -{"prodeuler",37,(void*)prodeuler,9,"V=GGEp"}, -{"prodinf",99,(void*)prodinf0,9,"V=GED0,L,p"}, -{"psi",1,(void*)gpsi,3,"Gp"}, -{"qfbclassno",99,(void*)qfbclassno0,4,"GD0,L,"}, -{"qfbcompraw",2,(void*)compraw,4,"GG"}, -{"qfbhclassno",18,(void*)hclassno,4,"G"}, -{"qfbnucomp",3,(void*)nucomp,4,"GGG"}, -{"qfbnupow",2,(void*)nupow,4,"GG"}, -{"qfbpowraw",23,(void*)powraw,4,"GL"}, -{"qfbprimeform",29,(void*)primeform,4,"GGp"}, -{"qfbred",99,(void*)qfbred0,4,"GD0,L,DGDGDG"}, -{"qfgaussred",18,(void*)sqred,8,"G"}, -{"qfjacobi",1,(void*)jacobi,8,"Gp"}, -{"qflll",99,(void*)qflll0,8,"GD0,L,p"}, -{"qflllgram",99,(void*)qflllgram0,8,"GD0,L,p"}, -{"qfminim",33,(void*)qfminim0,8,"GGGD0,L,p"}, -{"qfperfection",18,(void*)perf,8,"G"}, -{"qfsign",18,(void*)signat,8,"G"}, -{"quadclassunit",96,(void*)quadclassunit0,4,"GD0,L,DGp"}, -{"quaddisc",18,(void*)quaddisc,4,"G"}, -{"quadgen",18,(void*)quadgen,4,"G"}, -{"quadhilbert",99,(void*)quadhilbert,4,"GDGp"}, -{"quadpoly",99,(void*)quadpoly0,4,"GDn"}, -{"quadray",99,(void*)quadray,4,"GGDGp"}, -{"quadregulator",1,(void*)gregula,4,"Gp"}, -{"quadunit",1,(void*)gfundunit,4,"Gp"}, -{"random",0,(void*)genrand,2,"DG"}, -{"real",18,(void*)greal,2,"G"}, -{"removeprimes",0,(void*)removeprimes,4,"DG"}, -{"reorder",0,(void*)reorder,11,"DG"}, -{"return",0,(void*)return0,11,"DG"}, -{"rnfalgtobasis",2,(void*)rnfalgtobasis,6,"GG"}, -{"rnfbasis",2,(void*)rnfbasis,6,"GG"}, -{"rnfbasistoalg",2,(void*)rnfbasistoalg,6,"GG"}, -{"rnfcharpoly",99,(void*)rnfcharpoly,6,"GGGDn"}, -{"rnfconductor",99,(void*)rnfconductor,6,"GGD0,L,"}, -{"rnfdedekind",99,(void*)rnfdedekind,6,"GGG"}, -{"rnfdet",99,(void*)rnfdet0,6,"GGDG"}, -{"rnfdisc",2,(void*)rnfdiscf,6,"GG"}, -{"rnfeltabstorel",2,(void*)rnfelementabstorel,6,"GG"}, -{"rnfeltdown",2,(void*)rnfelementdown,6,"GG"}, -{"rnfeltreltoabs",2,(void*)rnfelementreltoabs,6,"GG"}, -{"rnfeltup",2,(void*)rnfelementup,6,"GG"}, -{"rnfequation",25,(void*)rnfequation0,6,"GGD0,L,"}, -{"rnfhnfbasis",2,(void*)rnfhermitebasis,6,"GG"}, -{"rnfidealabstorel",2,(void*)rnfidealabstorel,6,"GG"}, -{"rnfidealdown",2,(void*)rnfidealdown,6,"GG"}, -{"rnfidealhnf",2,(void*)rnfidealhermite,6,"GG"}, -{"rnfidealmul",3,(void*)rnfidealmul,6,"GGG"}, -{"rnfidealnormabs",2,(void*)rnfidealnormabs,6,"GG"}, -{"rnfidealnormrel",2,(void*)rnfidealnormrel,6,"GG"}, -{"rnfidealreltoabs",2,(void*)rnfidealreltoabs,6,"GG"}, -{"rnfidealtwoelt",2,(void*)rnfidealtwoelement,6,"GG"}, -{"rnfidealup",2,(void*)rnfidealup,6,"GG"}, -{"rnfinit",29,(void*)rnfinitalg,6,"GGp"}, -{"rnfisfree",20,(void*)rnfisfree,6,"lGG"}, -{"rnfisnorm",99,(void*)rnfisnorm,6,"GGD0,L,"}, -{"rnfisnorminit",99,(void*)rnfisnorminit,6,"GGD2,L,"}, -{"rnfkummer",99,(void*)rnfkummer,6,"GDGD0,L,p"}, -{"rnflllgram",99,(void*)rnflllgram,6,"GGGp"}, -{"rnfnormgroup",2,(void*)rnfnormgroup,6,"GG"}, -{"rnfpolred",29,(void*)rnfpolred,6,"GGp"}, -{"rnfpolredabs",99,(void*)rnfpolredabs,6,"GGD0,L,"}, -{"rnfpseudobasis",2,(void*)rnfpseudobasis,6,"GG"}, -{"rnfsteinitz",2,(void*)rnfsteinitz,6,"GG"}, -{"round",99,(void*)round0,2,"GD&"}, -{"serconvol",2,(void*)convol,7,"GG"}, -{"serlaplace",18,(void*)laplace,7,"G"}, -{"serreverse",18,(void*)recip,7,"G"}, -{"setintersect",2,(void*)setintersect,8,"GG"}, -{"setisset",10,(void*)setisset,8,"lG"}, -{"setminus",2,(void*)setminus,8,"GG"}, -{"setrand",99,(void*)setrand,11,"lL"}, -{"setsearch",99,(void*)setsearch,8,"lGGD0,L,"}, -{"setunion",2,(void*)setunion,8,"GG"}, -{"shift",99,(void*)gshift3,1,"GLD0,L,"}, -{"shiftmul",99,(void*)gmul2n,1,"GL"}, -{"sigma",99,(void*)gsumdivk,4,"GD1,L,"}, -{"sign",10,(void*)gsigne,1,"lG"}, -{"simplify",18,(void*)simplify,2,"G"}, -{"sin",1,(void*)gsin,3,"Gp"}, -{"sinh",1,(void*)gsh,3,"Gp"}, -{"sizebyte",10,(void*)taille2,2,"lG"}, -{"sizedigit",10,(void*)sizedigit,2,"lG"}, -{"solve",37,(void*)zbrent,9,"V=GGEp"}, -{"sqr",18,(void*)gsqr,3,"G"}, -{"sqrt",1,(void*)gsqrt,3,"Gp"}, -{"sqrtint",18,(void*)racine,4,"G"}, -{"sqrtn",99,(void*)gsqrtn,3,"GGD&p"}, -{"subgrouplist",99,(void*)subgrouplist0,6,"GDGD0,L,p"}, -{"subst",99,(void*)gsubst0,7,"GGG"}, -{"sum",48,(void*)somme,9,"V=GGEDG"}, -{"sumalt",99,(void*)sumalt0,9,"V=GED0,L,p"}, -{"sumdiv",22,(void*)divsum,9,"GVE"}, -{"suminf",27,(void*)suminf,9,"V=GEp"}, -{"sumpos",99,(void*)sumpos0,9,"V=GED0,L,p"}, -{"tan",1,(void*)gtan,3,"Gp"}, -{"tanh",1,(void*)gth,3,"Gp"}, -{"taylor",12,(void*)tayl,7,"GnP"}, -{"teichmuller",18,(void*)teich,3,"G"}, -{"theta",29,(void*)theta,3,"GGp"}, -{"thetanullk",99,(void*)thetanullk,3,"GLp"}, -{"thue",99,(void*)thue,7,"GGDG"}, -{"thueinit",99,(void*)thueinit,7,"GD0,L,p"}, -{"trace",18,(void*)gtrace,8,"G"}, -{"truncate",99,(void*)trunc0,2,"GD&"}, -{"until",82,NULL,11,NULL}, -{"valuation",20,(void*)ggval,2,"lGG"}, -{"variable",18,(void*)gpolvar,2,"G"}, -{"vecextract",99,(void*)extract0,8,"GGDG"}, -{"vecmax",18,(void*)vecmax,1,"G"}, -{"vecmin",18,(void*)vecmin,1,"G"}, -{"vecsort",99,(void*)vecsort0,8,"GDGD0,L,"}, -{"vector",28,(void*)vecteur,8,"GDVDI"}, -{"vectorsmall",28,(void*)vecteursmall,8,"GDVDI"}, -{"vectorv",28,(void*)vvecteur,8,"GDVDI"}, -{"weber",99,(void*)weber0,3,"GD0,L,p"}, -{"while",81,NULL,11,NULL}, -{"zeta",1,(void*)gzeta,3,"Gp"}, -{"zetak",99,(void*)gzetakall,6,"GGD0,L,p"}, -{"zetakinit",1,(void*)initzeta,6,"Gp"}, -{"znlog",2,(void*)znlog,4,"GG"}, -{"znorder",18,(void*)order,4,"G"}, -{"znprimroot",18,(void*)ggener,4,"G"}, -{"znstar",18,(void*)znstar,4,"G"}, - -/* DO NOT REMOVE THIS BLANK LINE: chname & helpsynchro depend on it */ -{NULL,0,NULL,0,NULL} /* sentinel */ -}; +#include "init.h" --- /dev/null Sat Mar 1 19:52:54 2003 +++ src/desc/822help Mon Jun 16 15:58:06 2003 @@ -0,0 +1,19 @@ +#!/usr/bin/perl -w +use PARI::822; + +$class=$ARGV[0]; +print "char *helpmessages_${class}[]={\n"; +$/="\n;"; +PARI::822::read(\%funcs,$ARGV[1]); +foreach my $name (sort keys %funcs) +{ + my %func=%{$funcs{$name}}; + next if ($func{'Class'} ne $class); + my $help=$func{'Help'}; + $help =~ s/\n/ /g; + print " \"$help\",\n"; +} +print <<EOF +}; + +EOF --- /dev/null Sat Mar 1 19:52:54 2003 +++ src/desc/822proto Mon Jun 16 16:08:32 2003 @@ -0,0 +1,80 @@ +#!/usr/bin/perl -w +use PARI::822; + +$class=$ARGV[0]; +print "entree functions_${class}[]={\n"; +%valence=( +"Gp" => 1, +"GG" => 2, +"GGG" => 3, +"GGGG" => 4, +"lG" => 10, +"L" => 11, +"GnP" => 12, +"GDn" => 14, +"G" => 18, +"lGG" => 20, +"GL" => 21, +"GVE" => 22, +#"GL" => 23, +"LG" => 24, +"GGD0,L," => 25, +"GnG" => 26, +"V=GEp" => 27, +"GDVDI" => 28, +"GGp" => 29, +"lGGG" => 30, +"GDGDGD&" => 31, +"GGL" => 32, +"GGGD0,L,p" =>33, +"V=GGEp" => 37, +"V=GGEDG" => 47, +"GGDVDVDI" => 49, +"GDGDGD0,L,p" => 62, +"vV=GGI" => 83, +"vGVI" => 84, +"vV=GGGI" => 86, +"vV=GID0,L," => 87, +"GD0,L,DGp" => 91 +); +%spec_valence=( +"O" => 50, +"if" => 80, +"while" => 81, +"until" => 82, +"global" => 88 +); +$/="\n;"; +PARI::822::read(\%funcs,$ARGV[1]); +foreach my $name (sort keys %funcs) +{ + my %func=%{$funcs{$name}}; + next if ($func{'Class'} ne $class); + my $gpname=$func{'Function'}; + my $sec=$func{'Section'}; + my $proto=$func{'Prototype'}; + my $cname=$func{'C-Name'}; + if (defined($cname)) + { + my $fproto=$proto; + $proto =~ s/^[vl]//; + if ($proto eq "" || $proto =~ /^[DpP]/) + { + $valence=0; + } + else + { + $valence=defined($valence{$fproto})?$valence{$fproto}:99; + } + print "{\"$gpname\",$valence,(void*)$cname,$sec,\"$fproto\"},\n"; + } + else + { + $valence=defined($spec_valence{$gpname})?$spec_valence{$gpname}:0; + print "{\"$gpname\",$valence,NULL,$sec,NULL},\n"; + } +} +print <<EOF +{NULL,0,NULL,0,NULL} /* sentinel */ +}; +EOF --- /dev/null Sat Mar 1 19:52:54 2003 +++ src/desc/Def Mon Jun 16 23:54:58 2003 @@ -0,0 +1,4793 @@ +Function: Euler +Class: basic +Section: 3 +C-Name: mpeuler +Prototype: p +Help: Euler=Euler(): Euler's constant with current precision +Description: + ():real:prec mpeuler(prec) + +Function: I +Class: basic +Section: 3 +C-Name: geni +Prototype: +Help: I=I(): square root of -1 +Description: + ():gen gi + +Function: List +Class: basic +Section: 2 +C-Name: gtolist +Prototype: DG +Help: List({x=[]}): transforms the vector or list x into a list. Empty list + if x is omitted +Description: + (?gen):list gtolist($1) + +Function: Mat +Class: basic +Section: 2 +C-Name: gtomat +Prototype: DG +Help: Mat({x=[]}): transforms any GEN x into a matrix. Empty matrix if x is + omitted + +Function: Mod +Class: basic +Section: 2 +C-Name: Mod0 +Prototype: GGD0,L, +Help: Mod(x,y,{flag=0}): creates the object x modulo y. flag is optional, + and can be 0: default, creates on the Pari stack, or 1: creates a permanent + object on the heap +Description: + (small, small, ?0):gen gmodulss($1, $2) + (small, gen, ?0):gen gmodulsg($1, $2) + (gen, gen, ?0):gen gmodulcp($1, $2) + (gen, gen, 1):gen gmodulo($1, $2) + (gen, gen, small):gen Mod0($1, $2, $3) + +Function: O +Class: basic +Section: 7 +Help: O(a^b): p-adic or power series zero with precision given by b + +Function: Pi +Class: basic +Section: 3 +C-Name: mppi +Prototype: p +Help: Pi=Pi(): the constant pi, with current precision +Description: + ():real:prec mppi(prec) + +Function: Pol +Class: basic +Section: 2 +C-Name: gtopoly +Prototype: GDn +Help: Pol(x,{v=x}): convert x (usually a vector or a power series) into a + polynomial with variable v, starting with the leading coefficient + +Function: Polrev +Class: basic +Section: 2 +C-Name: gtopolyrev +Prototype: GDn +Help: Polrev(x,{v=x}): convert x (usually a vector or a power series) into a + polynomial with variable v, starting with the constant term + +Function: Qfb +Class: basic +Section: 2 +C-Name: Qfb0 +Prototype: GGGDGp +Help: Qfb(a,b,c,{D=0.}): binary quadratic form a*x^2+b*x*y+c*y^2. D is + optional (0.0 by default) and initializes Shanks's distance if b^2-4*a*c>0 + +Function: Ser +Class: basic +Section: 2 +C-Name: gtoser +Prototype: GDn +Help: Ser(x,{v=x}): convert x (usually a vector) into a power series with + variable v, starting with the constant coefficient + +Function: Set +Class: basic +Section: 2 +C-Name: gtoset +Prototype: DG +Help: Set({x=[]}): convert x into a set, i.e. a row vector with strictly + increasing coefficients. Empty set if x is omitted +Description: + ():vec cgetg(1,t_VEC) + (gen):vec gtoset($1) + +Function: Str +Class: basic +Section: 2 +C-Name: Str +Prototype: s* +Help: Str({str}*): concatenates its (string) argument into a single string +Description: + (gen, ?0):genstr:copy:parens $genstr:1 + (gen, 1):genstr strtoGENstr($str:1, 1) + (gen, small):genstr strtoGENstr($str:1, $2) + +Function: Strexpand +Class: basic +Section: 2 +C-Name: Strexpand +Prototype: s* +Help: Strexpand({str}*): concatenates its (string) argument into a single + string, performing tilde expansion + +Function: Strtex +Class: basic +Section: 2 +C-Name: Strtex +Prototype: s* +Help: Strtex({str}*): translates its (string) arguments to TeX format and + returns the resulting string + +Function: Vec +Class: basic +Section: 2 +C-Name: gtovec +Prototype: DG +Help: Vec({x=[]}): transforms the object x into a vector. Used mainly if x + is a polynomial or a power series. Empty vector if x is omitted +Description: + ():vec cgetg(1,t_VEC) + (gen):vec gtovec($1) + +Function: Vecsmall +Class: basic +Section: 2 +C-Name: gtovecsmall +Prototype: DG +Help: Vecsmall({x=[]}): transforms the object x into a VECSMALL. Empty + vector if x is omitted + +Function: abs +Class: basic +Section: 3 +C-Name: gabs +Prototype: Gp +Help: abs(x): absolute value (or modulus) of x +Description: + (small):small labs($1) + (int):int mpabs($1) + (real):real mpabs($1) + (mp):mp mpabs($1) + (gen):gen:prec gabs($1, prec) + +Function: acos +Class: basic +Section: 3 +C-Name: gacos +Prototype: Gp +Help: acos(x): inverse cosine of x + +Function: acosh +Class: basic +Section: 3 +C-Name: gach +Prototype: Gp +Help: acosh(x): inverse hyperbolic cosine of x + +Function: addhelp +Class: highlevel +Section: 11 +C-Name: addhelp +Prototype: vSs +Help: addhelp(symbol,\"message\"): add/change help message for a symbol + +Function: addprimes +Class: basic +Section: 4 +C-Name: addprimes +Prototype: DG +Help: addprimes({x=[]}): add primes in the vector x (with at most 100 + components) to the prime table. x may also be a single integer. The + \"primes\" may in fact be composite, obtained for example by the function + factor(x,0), and in that case the message \"impossible inverse modulo\" will + give you some factors. List the current extra primes if x is omitted. If + some primes are added which divide non trivially the existing table, + suitable updating is done + +Function: agm +Class: basic +Section: 3 +C-Name: agm +Prototype: GGp +Help: agm(x,y): arithmetic-geometric mean of x and y + +Function: algdep +Class: basic +Section: 8 +C-Name: algdep0 +Prototype: GLD0,L,p +Help: algdep(x,n,{flag=0}): algebraic relations up to degree n of x. flag is + optional, and can be 0: default, uses the algorithm of Hastad et al, or + non-zero, and in that case is a number of decimal digits which should be + between 0.5 and 1.0 times the number of decimal digits of accuracy of x, and + uses a standard LLL + +Function: alias +Class: basic +Section: 11 +C-Name: alias0 +Prototype: vrr +Help: alias(\"new\",\"old\"): new is now an alias for old + +Function: allocatemem +Class: gp +Section: 11 +C-Name: allocatemem0 +Prototype: vD0,L, +Help: allocatemem({s=0}): allocates a new stack of s bytes. doubles the + stack if s is omitted + +Function: arg +Class: basic +Section: 3 +C-Name: garg +Prototype: Gp +Help: arg(x): argument of x,such that -pi<arg(x)<=pi + +Function: asin +Class: basic +Section: 3 +C-Name: gasin +Prototype: Gp +Help: asin(x): inverse sine of x + +Function: asinh +Class: basic +Section: 3 +C-Name: gash +Prototype: Gp +Help: asinh(x): inverse hyperbolic sine of x + +Function: atan +Class: basic +Section: 3 +C-Name: gatan +Prototype: Gp +Help: atan(x): inverse tangent of x + +Function: atanh +Class: basic +Section: 3 +C-Name: gath +Prototype: Gp +Help: atanh(x): inverse hyperbolic tangent of x + +Function: bernfrac +Class: basic +Section: 3 +C-Name: bernfrac +Prototype: L +Help: bernfrac(x): Bernoulli number B_x, as a rational number + +Function: bernreal +Class: basic +Section: 3 +C-Name: bernreal +Prototype: Lp +Help: bernreal(x): Bernoulli number B_x, as a real number with the current + precision + +Function: bernvec +Class: basic +Section: 3 +C-Name: bernvec +Prototype: L +Help: bernvec(x): Vector of rational Bernoulli numbers B_0, B_2,...up to + B_(2x) + +Function: besselh1 +Class: basic +Section: 3 +C-Name: hbessel1 +Prototype: GGp +Help: besselh1(nu,x): H^1-bessel function of index nu and argument x + +Function: besselh2 +Class: basic +Section: 3 +C-Name: hbessel2 +Prototype: GGp +Help: besselh2(nu,x): H^2-bessel function of index nu and argument x + +Function: besseli +Class: basic +Section: 3 +C-Name: ibessel +Prototype: GGp +Help: besseli(nu,x): I-bessel function of index nu and argument x + +Function: besselj +Class: basic +Section: 3 +C-Name: jbessel +Prototype: GGp +Help: besselj(nu,x): J-bessel function of index nu and argument x + +Function: besseljh +Class: basic +Section: 3 +C-Name: jbesselh +Prototype: GGp +Help: besseljh(n,x): J-bessel function of index n+1/2 and argument x, where + n is a non-negative integer + +Function: besselk +Class: basic +Section: 3 +C-Name: kbessel0 +Prototype: GGD0,L,p +Help: besselk(nu,x,{flag=0}): K-bessel function of index nu and argument x + (x positive real of type real, nu of any scalar type). flag is optional, and + may be set to 0: default; 1: use hyperu + +Function: besseln +Class: basic +Section: 3 +C-Name: nbessel +Prototype: GGp +Help: besseln(nu,x): N-bessel function of index nu and argument x + +Function: bestappr +Class: basic +Section: 4 +C-Name: bestappr0 +Prototype: GGDG +Help: bestappr(x,k): gives the best approximation to the real x with + denominator less or equal to k + +Function: bezout +Class: basic +Section: 4 +C-Name: vecbezout +Prototype: GG +Help: bezout(x,y): gives a 3-dimensional row vector [u,v,d] such that + d=gcd(x,y) and u*x+v*y=d + +Function: bezoutres +Class: basic +Section: 4 +C-Name: vecbezoutres +Prototype: GG +Help: bezoutres(x,y): gives a 3-dimensional row vector [u,v,d] such that + d=resultant(x,y) and u*x+v*y=d, where x and y are polynomials + +Function: bigomega +Class: basic +Section: 4 +C-Name: gbigomega +Prototype: G +Help: bigomega(x): number of prime divisors of x, counted with multiplicity +Description: + (int):small bigomega($1) + (gen):gen gbigomega($1) + +Function: binary +Class: basic +Section: 2 +C-Name: binaire +Prototype: G +Help: binary(x): gives the vector formed by the binary digits of x (x + integer) + +Function: binomial +Class: basic +Section: 4 +C-Name: binome +Prototype: GL +Help: binomial(x,y): binomial coefficient x*(x-1)...*(x-y+1)/y! defined for + y in Z and any x + +Function: bitand +Class: basic +Section: 2 +C-Name: gbitand +Prototype: GG +Help: bitand(x,y): bitwise \"and\" of two integers x and y. Negative numbers + behave as if modulo big power of 2 +Description: + (small, small):small:parens $(1)&$(2) + (gen, gen):int gbitand($1, $2) + +Function: bitneg +Class: basic +Section: 2 +C-Name: gbitneg +Prototype: GD-1,L, +Help: bitneg(x,{n=-1}): bitwise negation of an integers x truncated to n + bits. n=-1 means represent infinite sequences of bit 1 as negative numbers. + Negative numbers behave as if modulo big power of 2 + +Function: bitnegimply +Class: basic +Section: 2 +C-Name: gbitnegimply +Prototype: GG +Help: bitnegimply(x,y): bitwise \"negated imply\" of two integers x and y, + in other words, x BITAND BITNEG(y). Negative numbers behave as if modulo big + power of 2 +Description: + (small, small):small:parens $(1)&~$(2) + (gen, gen):int gbitnegimply($1, $2) + +Function: bitor +Class: basic +Section: 2 +C-Name: gbitor +Prototype: GG +Help: bitor(x,y): bitwise \"or\" of two integers x and y. Negative numbers + behave as if modulo big power of 2 +Description: + (small, small):small:parens $(1)|$(2) + (gen, gen):int gbitor($1, $2) + +Function: bittest +Class: basic +Section: 2 +C-Name: gbittest3 +Prototype: GGD1,L, +Help: bittest(x,n,{c=1}): extracts |c| bits starting from number n + (coefficient of 2^n) of the integer x, returning the bits as an integer + bitmap; negative c means: treat negative values of x as if modulo big power + of 2; bits at negative offsets are zeros +Description: + (small, small):bool:parens ($(1)>>$(2))&1 + (int, small):bool bittest($1, $2) + (gen, gen):gen gbittest($1, $2) + +Function: bitxor +Class: basic +Section: 2 +C-Name: gbitxor +Prototype: GG +Help: bitxor(x,y): bitwise \"exclusive or\" of two integers x and y. + Negative numbers behave as if modulo big power of 2 +Description: + (small, small):small:parens $(1)^$(2) + (gen, gen):int gbitxor($1, $2) + +Function: bnfcertify +Class: basic +Section: 6 +C-Name: certifybuchall +Prototype: lG +Help: bnfcertify(bnf): certify the correctness (i.e. remove the GRH) of the + bnf data output by bnfclassunit or bnfinit + +Function: bnfclassunit +Class: basic +Section: 6 +C-Name: bnfclassunit0 +Prototype: GD0,L,DGp +Help: bnfclassunit(P,{flag=0},{tech=[]}): compute the class group, regulator + of the number field defined by the polynomial P, and also the fundamental + units if they are not too large. flag and tech are both optional. flag can + be any of 0: default, 1: insist on having fundamental units, 2: do not + compute units. See manual for details about tech. P may also be a non-zero + integer, and is then considered as the discriminant of a quadratic order + +Function: bnfclgp +Class: basic +Section: 6 +C-Name: classgrouponly +Prototype: GDGp +Help: bnfclgp(P,{tech=[]}): compute the class group of the number field + defined by the polynomial P. If P is a non-zero integer, it is interpreted + as a quadratic discriminant. See manual for details about tech + +Function: bnfdecodemodule +Class: basic +Section: 6 +C-Name: decodemodule +Prototype: GG +Help: bnfdecodemodule(nf,fa): given a coded module fa as in bnrdisclist, + gives the true module + +Function: bnfinit +Class: basic +Section: 6 +C-Name: bnfinit0 +Prototype: GD0,L,DGp +Help: bnfinit(P,{flag=0},{tech=[]}): compute the necessary data for future + use in ideal and unit group computations, including fundamental units if + they are not too large. flag and tech are both optional. flag can be any of + 0: default, 1: insist on having fundamental units, 2: do not compute units, + 3: small bnfinit, which can be converted to a big one using bnfmake. See + manual for details about tech +Description: + (gen):bnf:prec bnfinit0($1, 0, NULL, prec) + (gen, 0):bnf:prec bnfinit0($1, 0, NULL, prec) + (gen, 1):bnf:prec bnfinit0($1, 1, NULL, prec) + (gen, 2):bnf:prec bnfinit0($1, 2, NULL, prec) + (gen, 3):bnf:prec bnfinit0($1, 3, NULL, prec) + (gen, ?small, ?gen):bnf:prec bnfinit0($1, $2, $3, prec) + +Function: bnfisintnorm +Class: basic +Section: 6 +C-Name: bnfisintnorm +Prototype: GG +Help: bnfisintnorm(bnf,x): compute a complete system of solutions (modulo + units of positive norm) of the absolute norm equation N(a)=x, where a + belongs to the maximal order of big number field bnf (if bnf is not + certified, this depends on GRH) + +Function: bnfisnorm +Class: basic +Section: 6 +C-Name: bnfisnorm +Prototype: GGD1,L,p +Help: bnfisnorm(bnf,x,{flag=1}): Tries to tell whether x (in Q) is the norm + of some fractional y (in bnf). Returns a vector [a,b] where x=Norm(a)*b. + Looks for a solution which is a S-unit, with S a certain list of primes (in + bnf) containing (among others) all primes dividing x. If bnf is known to be + Galois, set flag=0 (in this case, x is a norm iff b=1). If flag is non zero + the program adds to S all the primes : dividing flag if flag<0, or less than + flag if flag>0. The answer is guaranteed (i.e x norm iff b=1) under GRH, if + S contains all primes less than 12.log(disc(Bnf))^2, where Bnf is the Galois + closure of bnf + +Function: bnfisprincipal +Class: basic +Section: 6 +C-Name: isprincipalall +Prototype: GGD1,L, +Help: bnfisprincipal(bnf,x,{flag=1}): bnf being output by bnfinit (with + flag<=2), gives [v,alpha,bitaccuracy], where v is the vector of exponents on + the class group generators and alpha is the generator of the resulting + principal ideal. In particular x is principal if and only if v is the zero + vector. flag is optional, whose meaning is: 0: output only v; 1: default; 2: + output only v, precision being doubled until the result is obtained; 3: as 2 + but output generators + +Function: bnfissunit +Class: basic +Section: 6 +C-Name: bnfissunit +Prototype: GGG +Help: bnfissunit(bnf,sfu,x): bnf being output by bnfinit (with flag<=2), sfu + by bnfsunit, gives the column vector of exponents of x on the fundamental + S-units and the roots of unity if x is a unit, the empty vector otherwise + +Function: bnfisunit +Class: basic +Section: 6 +C-Name: isunit +Prototype: GG +Help: bnfisunit(bnf,x): bnf being output by bnfinit (with flag<=2), gives + the column vector of exponents of x on the fundamental units and the roots + of unity if x is a unit, the empty vector otherwise + +Function: bnfmake +Class: basic +Section: 6 +C-Name: bnfmake +Prototype: Gp +Help: bnfmake(sbnf): transforms small sbnf as output by bnfinit with flag=3 + into a true big bnf + +Function: bnfnarrow +Class: basic +Section: 6 +C-Name: buchnarrow +Prototype: G +Help: bnfnarrow(bnf): given a big number field as output by bnfinit, gives + as a 3-component vector the structure of the narrow class group + +Function: bnfreg +Class: basic +Section: 6 +C-Name: regulator +Prototype: GDGp +Help: bnfreg(P,{tech=[]}): compute the regulator of the number field defined + by the polynomial P. If P is a non-zero integer, it is interpreted as a + quadratic discriminant. See manual for details about tech + +Function: bnfsignunit +Class: basic +Section: 6 +C-Name: signunits +Prototype: G +Help: bnfsignunit(bnf): matrix of signs of the real embeddings of the system + of fundamental units found by bnfinit + +Function: bnfsunit +Class: basic +Section: 6 +C-Name: bnfsunit +Prototype: GGp +Help: bnfsunit(bnf,S): compute the fundamental S-units of the number field + bnf output by bnfinit, S being a list of prime ideals. res[1] contains the + S-units, res[5] the S-classgroup. See manual for details + +Function: bnfunit +Class: basic +Section: 6 +C-Name: buchfu +Prototype: G +Help: bnfunit(bnf): compute the fundamental units of the number field bnf + output by bnfinit when they have not yet been computed (i.e. with flag=2) + +Function: bnrL1 +Class: basic +Section: 6 +C-Name: bnrL1 +Prototype: GDGD0,L,p +Help: bnrL1(bnr, {subgroup}, {flag=0}): bnr being output by bnrinit(,,1) and + subgroup being a square matrix defining a congruence subgroup of bnr (the + trivial subgroup if omitted), for each character of bnr trivial on this + subgroup, compute L(1, chi) (or equivalently the first non-zero term c(chi) + of the expansion at s = 0). The binary digits of flag mean 1: if 0 then + compute the term c(chi) and return [r(chi), c(chi)] where r(chi) is the + order of L(s, chi) at s = 0, or if 1 then compute the value at s = 1 (and in + this case, only for non-trivial characters), 2: if 0 then compute the value + of the primitive L-function associated to chi, if 1 then compute the value + of the L-function L_S(s, chi) where S is the set of places dividing the + modulus of bnr (and the infinite places), 3: return also the characters + +Function: bnrclass +Class: basic +Section: 6 +C-Name: bnrclass0 +Prototype: GGD0,L, +Help: bnrclass(bnf,ideal,{flag=0}): given a big number field as output by + bnfinit (only) and an ideal or a 2-component row vector formed by an ideal + and a list of R1 zeros or ones representing a module, finds the ray class + group structure corresponding to this module. flag is optional, and can be + 0: default, 1: compute data necessary for working in the ray class group, + for example with functions such as bnrisprincipal or bnrdisc, without + computing the generators of the ray class group, or 2: with the generators. + When flag=1 or 2, the fifth component is the ray class group structure + obtained when flag=0 + +Function: bnrclassno +Class: basic +Section: 6 +C-Name: rayclassno +Prototype: GG +Help: bnrclassno(bnf,x): ray class number of the module x for the big number + field bnf. Faster than bnrclass if only the ray class number is wanted + +Function: bnrclassnolist +Class: basic +Section: 6 +C-Name: rayclassnolist +Prototype: GG +Help: bnrclassnolist(bnf,list): if list is as output by ideallist or + similar, gives list of corresponding ray class numbers + +Function: bnrconductor +Class: basic +Section: 6 +C-Name: bnrconductor +Prototype: GDGDGDG +Help: bnrconductor(a1,{a2},{a3},{flag=0}): conductor f of the subfield of + the ray class field given by a1,a2,a3 (see bnrdisc). flag is optional and + can be 0: default, 1: returns [f, Cl_f, H], H subgroup of the ray class + group modulo f defining the extension, 2: returns [f, bnr(f), H] + +Function: bnrconductorofchar +Class: basic +Section: 6 +C-Name: bnrconductorofchar +Prototype: GG +Help: bnrconductorofchar(bnr,chi): conductor of the character chi on the ray + class group bnr + +Function: bnrdisc +Class: basic +Section: 6 +C-Name: bnrdisc0 +Prototype: GDGDGD0,L, +Help: bnrdisc(a1,{a2},{a3},{flag=0}): absolute or relative [N,R1,discf] of + the field defined by a1,a2,a3. [a1,{a2},{a3}] is of type [bnr], + [bnr,subgroup], [bnf, module] or [bnf,module,subgroup], where bnf is as + output by bnfclassunit (with flag<=2), bnr by bnrclass (with flag>0), and + subgroup is the HNF matrix of a subgroup of the corresponding ray class + group (if omitted, the trivial subgroup). flag is optional whose binary + digits mean 1: give relative data; 2: return 0 if module is not the + conductor + +Function: bnrdisclist +Class: basic +Section: 6 +C-Name: bnrdisclist0 +Prototype: GGDGD0,L, +Help: bnrdisclist(bnf,bound,{arch},{flag=0}): gives list of discriminants of + ray class fields of all conductors up to norm bound, where the ramified + Archimedean places are given by arch (unramified at infinity if arch is + void), in a long vector format. If (optional) flag is present and non-null, + give arch all the possible values. Supports the alternative syntax + bnrdisclist(bnf,list), where list is as output by ideallist or ideallistarch + (with units) + +Function: bnrinit +Class: basic +Section: 6 +C-Name: bnrinit0 +Prototype: GGD0,L, +Help: bnrinit(bnf,ideal,{flag=0}): given a big number field as output by + bnfinit (only) and an ideal or a 2-component row vector formed by an ideal + and a list of R1 zeros or ones representing a module, initializes data + linked to the ray class group structure corresponding to this module. flag + is optional, and can be 0: default (same as bnrclass with flag = 1), 1: + compute also the generators (same as bnrclass with flag = 2). The fifth + component is the ray class group structure + +Function: bnrisconductor +Class: basic +Section: 6 +C-Name: bnrisconductor +Prototype: lGDGDG +Help: bnrisconductor(a1,{a2},{a3}): returns 1 if the modulus is the + conductor of the subfield of the ray class field given by a1,a2,a3 (see + bnrdisc), and 0 otherwise. Slightly faster than bnrconductor if this is the + only desired result + +Function: bnrisprincipal +Class: basic +Section: 6 +C-Name: isprincipalrayall +Prototype: GGD1,L, +Help: bnrisprincipal(bnr,x,{flag=1}): bnr being output by bnrinit, gives + [v,alpha,bitaccuracy], where v is the vector of exponents on the class group + generators and alpha is the generator of the resulting principal ideal. In + particular x is principal if and only if v is the zero vector. If (optional) + flag is set to 0, output only v + +Function: bnrrootnumber +Class: basic +Section: 6 +C-Name: bnrrootnumber +Prototype: GGD0,L,p +Help: bnrrootnumber(bnr,chi,{flag=0}); returns the so-called Artin Root + Number, i.e. the constant W appearing in the functional equation of the + Hecke L-function associated to chi. Set flag = 1 if the character is known + to be primitive + +Function: bnrstark +Class: basic +Section: 6 +C-Name: bnrstark +Prototype: GDGD0,L,p +Help: bnrstark(bnr,{subgroup},{flag=0}): bnr being as output by + bnrinit(,,1), finds a relative equation for the class field corresponding to + the module in bnr and the given congruence subgroup (the trivial subgroup if + omitted) using Stark's units. The ground field and the class field must be + totally real. flag is optional and may be set to 0 to obtain a reduced + polynomial, 1 to obtain a non reduced polynomial, 2 to obtain an absolute + polynomial and 3 to obtain the irreducible polynomial of the Stark unit, 0 + being default. If 4 is added to the value of flag, try hard to find the best + modulus + +Function: break +Class: basic +Section: 11 +C-Name: break0 +Prototype: D1,L, +Help: break({n=1}): interrupt execution of current instruction sequence, and + exit from the n innermost enclosing loops + +Function: ceil +Class: basic +Section: 2 +C-Name: gceil +Prototype: G +Help: ceil(x): ceiling of x=smallest integer>=x +Description: + (small):small ($1) + (int):int icopy($1) + (mp):int gceil($1) + (gen):gen gceil($1) + +Function: centerlift +Class: basic +Section: 2 +C-Name: centerlift0 +Prototype: GDn +Help: centerlift(x,{v}): centered lift of x. Same as lift except for + integermods +Description: + (pol):pol centerlift($1) + (vec):vec centerlift($1) + (gen):gen centerlift($1) + (pol, var):pol centerlift0($1, $2) + (vec, var):vec centerlift0($1, $2) + (gen, var):gen centerlift0($1, $2) + +Function: changevar +Class: basic +Section: 2 +C-Name: changevar +Prototype: GG +Help: changevar(x,y): change variables of x according to the vector y + +Function: charpoly +Class: basic +Section: 8 +C-Name: charpoly0 +Prototype: GDnD0,L, +Help: charpoly(A,{v=x},{flag=0}): det(v*Id-A)=characteristic polynomial of + the matrix A using the comatrix. flag is optional and may be set to 1 (use + Lagrange interpolation) or 2 (use Hessenberg form), 0 being the default + +Function: chinese +Class: basic +Section: 4 +C-Name: chinese +Prototype: GDG +Help: chinese(x,{y}): x,y being integers modulo mx and my, finds z such that + z is congruent to x mod mx and y mod my +Description: + (gen):gen chinese($1) + (gen, gen):gen chinois($1, $2) + +Function: component +Class: basic +Section: 2 +C-Name: compo +Prototype: GL +Help: component(x,s): the s'th component of the internal representation of + x. For vectors or matrices, it is simpler to use x[]. For list objects such + as nf, bnf, bnr or ell, it is much easier to use member functions starting + with \".\" + +Function: concat +Class: basic +Section: 8 +C-Name: concat +Prototype: GDG +Help: concat(x,{y}): concatenation of x and y, which can be scalars, vectors + or matrices, or lists (in this last case, both x and y have to be lists). If + y is omitted, x has to be a list or row vector and its elements are + concatenated +Description: + (mp, mp):vec concat($1, $2) + (vec, mp):vec concat($1, $2) + (mp, vec):vec concat($1, $2) + (gen, ?gen):gen concat($1, $2) + +Function: conj +Class: basic +Section: 2 +C-Name: gconj +Prototype: G +Help: conj(x): the algebraic conjugate of x + +Function: conjvec +Class: basic +Section: 2 +C-Name: conjvec +Prototype: Gp +Help: conjvec(x): conjugate vector of the algebraic number x + +Function: content +Class: basic +Section: 4 +C-Name: content +Prototype: G +Help: content(x): gcd of all the components of x, when this makes sense + +Function: contfrac +Class: basic +Section: 4 +C-Name: contfrac0 +Prototype: GDGD0,L, +Help: contfrac(x,{b},{lmax}): continued fraction expansion of x (x + rational,real or rational function). b and lmax are both optional, where b + is the vector of numerators of the continued fraction, and lmax is a bound + for the number of terms in the continued fraction expansion + +Function: contfracpnqn +Class: basic +Section: 4 +C-Name: pnqn +Prototype: G +Help: contfracpnqn(x): [p_n,p_{n-1}; q_n,q_{n-1}] corresponding to the + continued fraction x + +Function: core +Class: basic +Section: 4 +C-Name: core0 +Prototype: GD0,L, +Help: core(n,{flag=0}): unique (positive of negative) squarefree integer d + dividing n such that n/d is a square. If (optional) flag is non-null, output + the two-component row vector [d,f], where d is the unique squarefree integer + dividing n such that n/d=f^2 is a square + +Function: coredisc +Class: basic +Section: 4 +C-Name: coredisc0 +Prototype: GD0,L, +Help: coredisc(n,{flag=0}): discriminant of the quadratic field Q(sqrt(n)). + If (optional) flag is non-null, output a two-component row vector [d,f], + where d is the discriminant of the quadratic field Q(sqrt(n)) and n=df^2. f + may be a half integer + +Function: cos +Class: basic +Section: 3 +C-Name: gcos +Prototype: Gp +Help: cos(x): cosine of x + +Function: cosh +Class: basic +Section: 3 +C-Name: gch +Prototype: Gp +Help: cosh(x): hyperbolic cosine of x + +Function: cotan +Class: basic +Section: 3 +C-Name: gcotan +Prototype: Gp +Help: cotan(x): cotangent of x + +Function: default +Class: gp +Section: 11 +C-Name: default0 +Prototype: D\"\",r,D\"\",s,D0,L, +Help: default({opt},{v},{flag}): set the default opt to v. If v is omitted, + print the current default for opt. If no argument is given, print a list of + all defaults as well as their values. If flag is non-zero, return the result + instead of printing it on screen. See manual for details + +Function: denominator +Class: basic +Section: 2 +C-Name: denom +Prototype: G +Help: denominator(x): denominator of x (or lowest common denominator in case + of an array) + +Function: deriv +Class: basic +Section: 7 +C-Name: deriv +Prototype: GDn +Help: deriv(x,{y}): derivative of x with respect to the main variable of y, + or to the main variable of x if y is omitted + +Function: dilog +Class: basic +Section: 3 +C-Name: dilog +Prototype: Gp +Help: dilog(x): dilogarithm of x + +Function: dirdiv +Class: basic +Section: 4 +C-Name: dirdiv +Prototype: GG +Help: dirdiv(x,y): division of the Dirichlet series x by the Dirichlet + series y + +Function: direuler +Class: basic +Section: 4 +C-Name: direulerall +Prototype: V=GGEDG +Help: direuler(p=a,b,expr,{c}): Dirichlet Euler product of expression expr + from p=a to p=b, limited to b terms. Expr should be a polynomial or rational + function in p and X, and X is understood to mean p^(-s). If c is present, + output only the first c terms + +Function: dirmul +Class: basic +Section: 4 +C-Name: dirmul +Prototype: GG +Help: dirmul(x,y): multiplication of the Dirichlet series x by the Dirichlet + series y + +Function: dirzetak +Class: basic +Section: 6 +C-Name: dirzetak +Prototype: GG +Help: dirzetak(nf,b): Dirichlet series of the Dedekind zeta function of the + number field nf up to the bound b-1 + +Function: divisors +Class: basic +Section: 4 +C-Name: divisors +Prototype: G +Help: divisors(x): gives a vector formed by the divisors of x in increasing + order +Description: + (gen):vec divisors($1) + +Function: divrem +Class: basic +Section: 1 +C-Name: divrem +Prototype: GGDn +Help: divrem(x,y,{v}): euclidean division of x by y giving as a + 2-dimensional column vector the quotient and the remainder, with respect to + v (to main variable if v is omitted) + +Function: eint1 +Class: basic +Section: 3 +C-Name: veceint1 +Prototype: GDGp +Help: eint1(x,{n}): exponential integral E1(x). If n is present, computes + the vector of the first n values of the exponential integral E1(n.x) (x > 0) + +Function: elladd +Class: basic +Section: 5 +C-Name: addell +Prototype: GGG +Help: elladd(e,z1,z2): sum of the points z1 and z2 on elliptic curve e + +Function: ellak +Class: basic +Section: 5 +C-Name: akell +Prototype: GG +Help: ellak(e,n): computes the n-th Fourier coefficient of the L-function of + the elliptic curve e + +Function: ellan +Class: basic +Section: 5 +C-Name: anell +Prototype: GL +Help: ellan(e,n): computes the first n Fourier coefficients of the + L-function of the elliptic curve e (n<2^24 on a 32-bit machine) + +Function: ellap +Class: basic +Section: 5 +C-Name: ellap0 +Prototype: GGD0,L, +Help: ellap(e,p,{flag=0}): computes a_p for the elliptic curve e using + Shanks-Mestre's method. flag is optional and can be set to 0 (default) or 1 + (use Jacobi symbols) + +Function: ellbil +Class: basic +Section: 5 +C-Name: bilhell +Prototype: GGGp +Help: ellbil(e,z1,z2): canonical bilinear form for the points z1,z2 on the + elliptic curve e. Either z1 or z2 can also be a vector/matrix of points + +Function: ellchangecurve +Class: basic +Section: 5 +C-Name: coordch +Prototype: GG +Help: ellchangecurve(x,y): change data on elliptic curve according to + y=[u,r,s,t] +Description: + (gen, gen):ell coordch($1, $2) + +Function: ellchangepoint +Class: basic +Section: 5 +C-Name: pointch +Prototype: GG +Help: ellchangepoint(x,y): change data on point or vector of points x on an + elliptic curve according to y=[u,r,s,t] + +Function: elleisnum +Class: basic +Section: 5 +C-Name: elleisnum +Prototype: GLD0,L,p +Help: elleisnum(om,k,{flag=0}): om=[om1,om2] being a 2-component vector + giving a basis of a lattice L and k an even positive integer, computes the + numerical value of the Eisenstein series of weight k. When flag is non-zero + and k=4 or 6, this gives g2 or g3 with the correct normalization + +Function: elleta +Class: basic +Section: 5 +C-Name: elleta +Prototype: Gp +Help: elleta(om): om=[om1,om2], returns the two-component row vector + [eta1,eta2] of quasi-periods associated to [om1,om2] + +Function: ellglobalred +Class: basic +Section: 5 +C-Name: globalreduction +Prototype: G +Help: ellglobalred(e): e being an elliptic curve, returns [N,[u,r,s,t],c], + where N is the conductor of e, [u,r,s,t] leads to the standard model for e, + and c is the product of the local Tamagawa numbers c_p +Description: + (gen):gen globalreduction($1) + +Function: ellheight +Class: basic +Section: 5 +C-Name: ellheight0 +Prototype: GGD2,L,p +Help: ellheight(e,x,{flag=0}): canonical height of point x on elliptic curve + E defined by the vector e. flag is optional and should be 0 or 1 (0 by + default): 0: use theta-functions, 1: use Tate's method + +Function: ellheightmatrix +Class: basic +Section: 5 +C-Name: mathell +Prototype: GGp +Help: ellheightmatrix(e,x): gives the height matrix for vector of points x + on elliptic curve e using theta functions + +Function: ellinit +Class: basic +Section: 5 +C-Name: ellinit0 +Prototype: GD0,L,p +Help: ellinit(x,{flag=0}): x being the vector [a1,a2,a3,a4,a6], gives the + vector: + [a1,a2,a3,a4,a6,b2,b4,b6,b8,c4,c6,delta,j,[e1,e2,e3],w1,w2,eta1,eta2,area]. + If the curve is defined over a p-adic field, the last six components are + replaced by root,u^2,u,q,w,0. If optional flag is 1, omit them altogether +Description: + (gen, ?0):bell:prec initell($1, prec) + (gen, 1):ell smallinitell($1) + (gen, small):ell:prec ellinit0($1, $2, prec) + +Function: ellisoncurve +Class: basic +Section: 5 +C-Name: oncurve +Prototype: lGG +Help: ellisoncurve(e,x): true(1) if x is on elliptic curve e, false(0) if + not + +Function: ellj +Class: basic +Section: 5 +C-Name: jell +Prototype: Gp +Help: ellj(x): elliptic j invariant of x + +Function: elllocalred +Class: basic +Section: 5 +C-Name: localreduction +Prototype: GG +Help: elllocalred(e,p): e being an elliptic curve, returns + [f,kod,[u,r,s,t],c], where f is the conductor's exponent, kod is the kodaira + type for e at p, [u,r,s,t] is the change of variable needed to make e + minimal at p, and c is the local Tamagawa number c_p + +Function: elllseries +Class: basic +Section: 5 +C-Name: lseriesell +Prototype: GGDGp +Help: elllseries(e,s,{A=1}): L-series at s of the elliptic curve e, where A + a cut-off point close to 1 + +Function: ellminimalmodel +Class: basic +Section: 5 +C-Name: ellminimalmodel +Prototype: GD& +Help: ellminimalmodel(e,{&v}): return the standard minimal integral model of + the rational elliptic curve e. Sets v to the corresponding change of + variables + +Function: ellorder +Class: basic +Section: 5 +C-Name: orderell +Prototype: GG +Help: ellorder(e,p): order of the point p on the elliptic curve e over Q, 0 + if non-torsion + +Function: ellordinate +Class: basic +Section: 5 +C-Name: ordell +Prototype: GGp +Help: ellordinate(e,x): y-coordinates corresponding to x-ordinate x on + elliptic curve e + +Function: ellpointtoz +Class: basic +Section: 5 +C-Name: zell +Prototype: GGp +Help: ellpointtoz(e,P): lattice point z corresponding to the point P on the + elliptic curve e + +Function: ellpow +Class: basic +Section: 5 +C-Name: powell +Prototype: GGG +Help: ellpow(e,x,n): n times the point x on elliptic curve e (n in Z) + +Function: ellrootno +Class: basic +Section: 5 +C-Name: ellrootno +Prototype: lGDG +Help: ellrootno(e,{p=1}): root number for the L-function of the elliptic + curve e. p can be 1 (default), global root number, or a prime p (including + 0) for the local root number at p + +Function: ellsigma +Class: basic +Section: 5 +C-Name: ellsigma +Prototype: GGD0,L,p +Help: ellsigma(om,z,{flag=0}): om=[om1,om2], value of the Weierstrass sigma + function of the lattice generated by om at z if flag = 0 (default). If flag + = 1, arbitrary determination of the logarithm of sigma. If flag = 2 or 3, + same but using the product expansion instead of theta series + +Function: ellsub +Class: basic +Section: 5 +C-Name: subell +Prototype: GGG +Help: ellsub(e,z1,z2): difference of the points z1 and z2 on elliptic curve + e + +Function: elltaniyama +Class: basic +Section: 5 +C-Name: taniyama +Prototype: G +Help: elltaniyama(e): modular parametrization of elliptic curve e + +Function: elltors +Class: basic +Section: 5 +C-Name: elltors0 +Prototype: GD0,L, +Help: elltors(e,{flag=0}): torsion subgroup of elliptic curve e: order, + structure, generators. If flag = 0, use Doud's algorithm; if flag = 1, use + Lutz-Nagell + +Function: ellwp +Class: basic +Section: 5 +C-Name: ellwp0 +Prototype: GDGD0,L,pP +Help: ellwp(e,{z=x},{flag=0}): Complex value of Weierstrass P function at z + on the lattice generated over Z by e=[om1,om2] (e as given by ellinit is + also accepted). Optional flag means 0 (default), compute only P(z), 1 + compute [P(z),P'(z)], 2 consider om as an elliptic curve and compute P(z) + for that curve (identical to ellztopoint in that case). If z is omitted or + is a simple variable, return formal expansion in z + +Function: ellzeta +Class: basic +Section: 5 +C-Name: ellzeta +Prototype: GGp +Help: ellzeta(om,z): om=[om1,om2], value of the Weierstrass zeta function of + the lattice generated by om at z + +Function: ellztopoint +Class: basic +Section: 5 +C-Name: pointell +Prototype: GGp +Help: ellztopoint(e,z): coordinates of point P on the curve e corresponding + to the complex number z + +Function: erfc +Class: basic +Section: 3 +C-Name: gerfc +Prototype: Gp +Help: erfc(x): complementary error function + +Function: error +Class: gp +Section: 11 +C-Name: error0 +Prototype: vs* +Help: error(\"msg\"): abort script with error message msg + +Function: eta +Class: basic +Section: 3 +C-Name: eta0 +Prototype: GD0,L,p +Help: eta(x,{flag=0}): if flag=0, eta function without the q^(1/24), + otherwise eta of the complex number x in the upper half plane intelligently + computed using SL(2,Z) transformations + +Function: eulerphi +Class: basic +Section: 4 +C-Name: gphi +Prototype: G +Help: eulerphi(x): Euler's totient function of x +Description: + (int):int phi($1) + (gen):gen gphi($1) + +Function: eval +Class: basic +Section: 7 +C-Name: geval +Prototype: G +Help: eval(x): evaluation of x, replacing variables by their value + +Function: exp +Class: basic +Section: 3 +C-Name: gexp +Prototype: Gp +Help: exp(x): exponential of x +Description: + (real):real mpexp($1) + (mp):mp:prec gexp($1, prec) + (gen):gen:prec gexp($1, prec) + +Function: extern +Class: gp +Section: 11 +C-Name: extern0 +Prototype: s +Help: extern(cmd): execute shell command cmd, and feeds the result to GP (as + if loading from file) + +Function: factor +Class: basic +Section: 4 +C-Name: factor0 +Prototype: GD-1,L, +Help: factor(x,{lim}): factorization of x. lim is optional and can be set + whenever x is of (possibly recursive) rational type. If lim is set return + partial factorization, using primes up to lim (up to primelimit if lim=0) +Description: + (int, ?-1):gen decomp($1) + (gen, ?-1):gen factor($1) + (int, 0):gen smallfact($1) + (int, #small):gen auxdecomp($1, $2) + (pol, #small):void $"partial factorization is not meaningful here" + (gen, #small):gen gboundfact($1, $2) + (gen, small):gen factor0($1, $2) + +Function: factorback +Class: basic +Section: 4 +C-Name: factorback0 +Prototype: GDGDG +Help: factorback(f,{e},{nf}): given a factorisation f, gives the factored + object back. If this is a prime ideal factorisation you must supply the + corresponding number field as last argument. If e is present, f has to be a + vector of the same length, and we return the product of the f[i]^e[i] + +Function: factorcantor +Class: basic +Section: 4 +C-Name: factcantor +Prototype: GG +Help: factorcantor(x,p): factorization mod p of the polynomial x using + Cantor-Zassenhaus + +Function: factorff +Class: basic +Section: 4 +C-Name: factmod9 +Prototype: GGG +Help: factorff(x,p,a): factorization of the polynomial x in the finite field + F_p[X]/a(X)F_p[X] + +Function: factorial +Class: basic +Section: 4 +C-Name: mpfactr +Prototype: Lp +Help: factorial(x): factorial of x (x C-integer), the result being given as + a real number + +Function: factorint +Class: basic +Section: 4 +C-Name: factorint +Prototype: GD0,L, +Help: factorint(x,{flag=0}): factor the integer x. flag is optional, whose + binary digits mean 1: avoid MPQS, 2: avoid first-stage ECM (may fall back on + it later), 4: avoid Pollard-Brent Rho and Shanks SQUFOF, 8: skip final ECM + (huge composites will be declared prime) + +Function: factormod +Class: basic +Section: 4 +C-Name: factormod0 +Prototype: GGD0,L, +Help: factormod(x,p,{flag=0}): factorization mod p of the polynomial x using + Berlekamp. flag is optional, and can be 0: default or 1: simple factormod, + same except that only the degrees of the irreducible factors are given + +Function: factornf +Class: basic +Section: 6 +C-Name: polfnf +Prototype: GG +Help: factornf(x,t): factorization of the polynomial x over the number field + defined by the polynomial t + +Function: factorpadic +Class: basic +Section: 7 +C-Name: factorpadic0 +Prototype: GGLD0,L, +Help: factorpadic(x,p,r,{flag=0}): p-adic factorization of the polynomial x + to precision r. flag is optional and may be set to 0 (use round 4) or 1 (use + Buchmann-Lenstra) + +Function: ffinit +Class: basic +Section: 4 +C-Name: ffinit +Prototype: GLDn +Help: ffinit(p,n,{v=x}): monic irreducible polynomial of degree n over + F_p[v] +Description: + (int, small, ?var):pol ffinit($1, $2, $3) + +Function: fibonacci +Class: basic +Section: 4 +C-Name: fibo +Prototype: L +Help: fibonacci(x): fibonacci number of index x (x C-integer) + +Function: floor +Class: basic +Section: 2 +C-Name: gfloor +Prototype: G +Help: floor(x): floor of x = largest integer<=x + +Function: for +Class: basic +Section: 11 +C-Name: forpari +Prototype: vV=GGI +Help: for(X=a,b,seq): the sequence is evaluated, X going from a up to b + +Function: fordiv +Class: basic +Section: 11 +C-Name: fordiv +Prototype: vGVI +Help: fordiv(n,X,seq): the sequence is evaluated, X running over the + divisors of n + +Function: forprime +Class: basic +Section: 11 +C-Name: forprime +Prototype: vV=GGI +Help: forprime(X=a,b,seq): the sequence is evaluated, X running over the + primes between a and b + +Function: forstep +Class: basic +Section: 11 +C-Name: forstep +Prototype: vV=GGGI +Help: forstep(X=a,b,s,seq): the sequence is evaluated, X going from a to b + in steps of s (can be a vector of steps) + +Function: forsubgroup +Class: basic +Section: 11 +C-Name: forsubgroup +Prototype: vV=GDGI +Help: forsubgroup(H=G,{bound},seq): execute seq for each subgroup H of the + abelian group G (in SNF form), whose index is bounded by bound. H is given + as a left divisor of G in HNF form + +Function: forvec +Class: basic +Section: 11 +C-Name: forvec +Prototype: vV=GID0,L, +Help: forvec(x=v,seq,{flag=0}): v being a vector of two-component vectors of + length n, the sequence is evaluated with x[i] going from v[i][1] to v[i][2] + for i=n,..,1 if flag is zero or omitted. If flag = 1 (resp. flag = 2), + restrict to increasing (resp. strictly increasing) sequences + +Function: frac +Class: basic +Section: 2 +C-Name: gfrac +Prototype: G +Help: frac(x): fractional part of x = x-floor(x) + +Function: galoisexport +Class: basic +Section: 6 +C-Name: galoisexport +Prototype: GD0,L, +Help: galoisexport(gal,{flag}): gal being a galois field as output by + galoisinit, output a string representing the underlying permutation group in + GAP notation (default) or Magma notation (flag = 1) + +Function: galoisfixedfield +Class: basic +Section: 6 +C-Name: galoisfixedfield +Prototype: GGD0,L,Dn +Help: galoisfixedfield(gal,perm,{flag},{v=y}): gal being a galois field as + output by galoisinit and perm an element of gal.group or a vector of such + elements, return [P,x] such that P is a polynomial defining the fixed field + of gal[1] by the subgroup generated by perm, and x is a root of P in gal + expressed as a polmod in gal.pol. If flag is 1 return only P. If flag is 2 + return [P,x,F] where F is the factorization of gal.pol over the field + defined by P, where the variable v stands for a root of P +Description: + (gen, gen, ?small, ?var):vec galoisfixedfield($1, $2, $3, $4) + +Function: galoisidentify +Class: basic +Section: 6 +C-Name: galoisidentify +Prototype: G +Help: galoisidentify(gal): gal being a galois field as output by galoisinit, + output the isomorphism class of the underlying abstract group as a + two-components vector [o,i], where o is the group order, and i is the group + index in the GAP4 small group library + +Function: galoisinit +Class: basic +Section: 6 +C-Name: galoisinit +Prototype: GDGD0,L, +Help: galoisinit(pol,{den}): pol being a polynomial or a number field as + output by nfinit defining a Galois extension of Q, compute the Galois group + and all neccessary informations for computing fixed fields. den is optional + and has the same meaning as in nfgaloisconj(,4)(see manual) +Description: + (pol, ?int):gal galoisinit($1,$2) + +Function: galoisisabelian +Class: basic +Section: 6 +C-Name: galoisisabelian +Prototype: GD0,L, +Help: galoisisabelian(gal,{flag=0}): gal being as output by galoisinit, + return 0 if gal is not abelian, the HNF matrix of gal over gal.gen if + flag=0, 1 if flag is 1, and the SNF of gal is flag=2 + +Function: galoispermtopol +Class: basic +Section: 6 +C-Name: galoispermtopol +Prototype: GG +Help: galoispermtopol(gal,perm): gal being a galois field as output by + galoisinit and perm a element of gal.group, return the polynomial defining + the corresponding Galois automorphism + +Function: galoissubcyclo +Class: basic +Section: 6 +C-Name: galoissubcyclo +Prototype: GDGD0,L,Dn +Help: galoissubcyclo(N,H,{fl=0},{v}):Compute a polynomial (in variable v) + defining the subfield of Q(zeta_n) fixed by the subgroup H of (Z/nZ)*. N can + be an integer n, znstar(n) or bnrinit(bnfinit(y),[n,[1]],1). H can be given + by a generator, a set of generator given by a vector or a HNF matrix (see + manual). If flag is 1, output only the conductor of the abelian extension. + If flag is 2 output [pol,f] where pol is the polynomial and f the conductor. + +Function: galoissubfields +Class: basic +Section: 6 +C-Name: galoissubfields +Prototype: GD0,L,Dn +Help: galoissubfields(G,{flags=0},{v}):Output all the subfields of G. flags + have the same meaning as for galoisfixedfield + +Function: galoissubgroups +Class: basic +Section: 6 +C-Name: galoissubgroups +Prototype: G +Help: galoissubgroups(G):Output all the subgroups of G + +Function: gamma +Class: basic +Section: 3 +C-Name: ggamma +Prototype: Gp +Help: gamma(x): gamma function at x + +Function: gammah +Class: basic +Section: 3 +C-Name: ggamd +Prototype: Gp +Help: gammah(x): gamma of x+1/2 (x integer) + +Function: gcd +Class: basic +Section: 4 +C-Name: gcd0 +Prototype: GDGD0,L, +Help: gcd(x,{y},{flag=0}): greatest common divisor of x and y. flag is + optional, and can be 0: default, 1: use the modular gcd algorithm (x and y + must be polynomials), 2 use the subresultant algorithm (x and y must be + polynomials) +Description: + (small, small, ?0):small cgcd($1, $2) + (int, int, ?0):int mppgcd($1, $2) + (gen, gen, ?0):gen ggcd($1, $2) + (gen, gen, 1):gen modulargcd($1, $2) + (gen, gen, 2):gen srgcd($1, $2) + (gen, ?gen, ?small):gen gcd0($1, $2, $3) + +Function: getheap +Class: basic +Section: 11 +C-Name: getheap +Prototype: +Help: getheap(): 2-component vector giving the current number of objects in + the heap and the space they occupy + +Function: getrand +Class: basic +Section: 11 +C-Name: getrand +Prototype: l +Help: getrand(): current value of random number seed + +Function: getstack +Class: basic +Section: 11 +C-Name: getstack +Prototype: l +Help: getstack(): current value of stack pointer avma + +Function: gettime +Class: basic +Section: 11 +C-Name: gettime +Prototype: l +Help: gettime(): time (in milliseconds) since last call to gettime + +Function: global +Class: gp +Section: 11 +Help: global(x): declare x to be a global variable + +Function: hilbert +Class: basic +Section: 4 +C-Name: hil0 +Prototype: lGGDG +Help: hilbert(x,y,{p}): Hilbert symbol at p of x,y. If x,y are integermods + or p-adic, p can be omitted + +Function: hyperu +Class: basic +Section: 3 +C-Name: hyperu +Prototype: GGGp +Help: hyperu(a,b,x): U-confluent hypergeometric function + +Function: idealadd +Class: basic +Section: 6 +C-Name: idealadd +Prototype: GGG +Help: idealadd(nf,x,y): sum of two ideals x and y in the number field + defined by nf + +Function: idealaddtoone +Class: basic +Section: 6 +C-Name: idealaddtoone0 +Prototype: GGDG +Help: idealaddtoone(nf,x,{y}): if y is omitted, when the sum of the ideals + in the number field K defined by nf and given in the vector x is equal to + Z_K, gives a vector of elements of the corresponding ideals who sum to 1. + Otherwise, x and y are ideals, and if they sum up to 1, find one element in + each of them such that the sum is 1 + +Function: idealappr +Class: basic +Section: 6 +C-Name: idealappr0 +Prototype: GGD0,L, +Help: idealappr(nf,x,{flag=0}): x being a fractional ideal, gives an element + b such that v_p(b)=v_p(x) for all prime ideals p dividing x, and v_p(b)>=0 + for all other p. If (optional) flag is non-null x must be a prime ideal + factorization with possibly zero exponents + +Function: idealchinese +Class: basic +Section: 6 +C-Name: idealchinese +Prototype: GGG +Help: idealchinese(nf,x,y): x being a prime ideal factorization and y a + vector of elements, gives an element b such that v_p(b-y_p)>=v_p(x) for all + prime ideals p dividing x, and v_p(b)>=0 for all other p + +Function: idealcoprime +Class: basic +Section: 6 +C-Name: idealcoprime +Prototype: GGG +Help: idealcoprime(nf,x,y): gives an element b in nf such that b. x is an + integral ideal coprime to the integral ideal y + +Function: idealdiv +Class: basic +Section: 6 +C-Name: idealdiv0 +Prototype: GGGD0,L, +Help: idealdiv(nf,x,y,{flag=0}): quotient x/y of two ideals x and y in HNF + in the number field nf. If (optional) flag is non-null, the quotient is + supposed to be an integral ideal (slightly faster) +Description: + (gen, gen, gen, ?0):gen idealdiv($1, $2, $3) + (gen, gen, gen, 1):gen idealdivexact($1, $2, $3) + (gen, gen, gen, #small):gen $"invalid flag in idealdiv" + (gen, gen, gen, small):gen idealdiv0($1, $2, $3, $4) + +Function: idealfactor +Class: basic +Section: 6 +C-Name: idealfactor +Prototype: GG +Help: idealfactor(nf,x): factorization of the ideal x given in HNF into + prime ideals in the number field nf + +Function: idealhnf +Class: basic +Section: 6 +C-Name: idealhnf0 +Prototype: GGDG +Help: idealhnf(nf,a,{b}): hermite normal form of the ideal a in the number + field nf, whatever form a may have. If called as idealhnf(nf,a,b), the ideal + is given as aZ_K+bZ_K in the number field K defined by nf + +Function: idealintersect +Class: basic +Section: 6 +C-Name: idealintersect +Prototype: GGG +Help: idealintersect(nf,x,y): intersection of two ideals x and y in the + number field defined by nf + +Function: idealinv +Class: basic +Section: 6 +C-Name: idealinv +Prototype: GG +Help: idealinv(nf,x,{flag=0}): inverse of the ideal x in the number field + nf. If flag is omitted or set to 0, use the different. If flag is 1 do not + use it +Description: + (gen, gen):gen idealinv($1, $2) + +Function: ideallist +Class: basic +Section: 6 +C-Name: ideallist0 +Prototype: GLD4,L, +Help: ideallist(nf,bound,{flag=4}): vector of vectors L of all idealstar of + all ideals of norm<=bound. If (optional) flag is present, its binary digits + are toggles meaning 1: give generators; 2: output [L,U], where L is as + before, and U is a vector of vector of zinternallogs of the units; 4: give + only the ideals and not the idealstar + +Function: ideallistarch +Class: basic +Section: 6 +C-Name: ideallistarch0 +Prototype: GGDGD0,L, +Help: ideallistarch(nf,list,{arch=[]},{flag=0}): vector of vectors of all + idealstarinit of all modules in list with archimedean arch (void if ommited + or arch=[]) added. flag is optional whose binary digits are toggles meaning + 1: give generators as well; 2: list format is [L,U], see ideallist + +Function: ideallog +Class: basic +Section: 6 +C-Name: zideallog +Prototype: GGG +Help: ideallog(nf,x,bid): if bid is a big ideal, as given by + idealstar(nf,I,1) or idealstar(nf,I,2), gives the vector of exponents on the + generators bid[2][3] (even if these generators have not been computed) + +Function: idealmin +Class: basic +Section: 6 +C-Name: minideal +Prototype: GGDGp +Help: idealmin(nf,ix,{vdir}): minimum of the ideal ix in the direction vdir + in the number field nf + +Function: idealmul +Class: basic +Section: 6 +C-Name: idealmul0 +Prototype: GGGD0,L,p +Help: idealmul(nf,x,y,{flag=0}): product of the two ideals x and y in the + number field nf. If (optional) flag is non-nul, reduce the result +Description: + (gen, gen, gen, ?0):gen idealmul($1, $2, $3) + (gen, gen, gen, 1):gen:prec idealmulred($1, $2, $3, prec) + (gen, gen, gen, #small):gen $"invalid flag in idealmul" + (gen, gen, gen, small):gen:prec idealmul0($1, $2, $3, $4, prec) + +Function: idealnorm +Class: basic +Section: 6 +C-Name: idealnorm +Prototype: GG +Help: idealnorm(nf,x): norm of the ideal x in the number field nf + +Function: idealpow +Class: basic +Section: 6 +C-Name: idealpow0 +Prototype: GGGD0,L,p +Help: idealpow(nf,x,n,{flag=0}): n-th power of the ideal x in HNF in the + number field nf If (optional) flag is non-null, reduce the result + +Function: idealprimedec +Class: basic +Section: 6 +C-Name: primedec +Prototype: GG +Help: idealprimedec(nf,p): prime ideal decomposition of the prime number p + in the number field nf as a vector of 5 component vectors [p,a,e,f,b] + representing the prime ideals pZ_K+a. Z_K, e,f as usual, a as vector of + components on the integral basis, b Lenstra's constant + +Function: idealprincipal +Class: basic +Section: 6 +C-Name: principalideal +Prototype: GG +Help: idealprincipal(nf,x): returns the principal ideal generated by the + algebraic number x in the number field nf + +Function: idealred +Class: basic +Section: 6 +C-Name: ideallllred +Prototype: GGDGp +Help: idealred(nf,x,{vdir=0}): LLL reduction of the ideal x in the number + field nf along direction vdir, in HNF + +Function: idealstar +Class: basic +Section: 6 +C-Name: idealstar0 +Prototype: GGD1,L, +Help: idealstar(nf,I,{flag=1}): gives the structure of (Z_K/I)^*. flag is + optional, and can be 0: simply gives the structure as a 3-component vector v + such that v[1] is the order (i.e. eulerphi(I)), v[2] is a vector of cyclic + components, and v[3] is a vector giving the corresponding generators. If + flag=1 (default), gives idealstarinit, i.e. a 6-component vector + [I,v,fa,f2,U,V] where v is as above without the generators, fa is the prime + ideal factorisation of I and f2, U and V are technical but essential to work + in (Z_K/I)^*. Finally if flag=2, same as with flag=1 except that the + generators are also given + +Function: idealtwoelt +Class: basic +Section: 6 +C-Name: ideal_two_elt0 +Prototype: GGDG +Help: idealtwoelt(nf,x,{a}): two-element representation of an ideal x in the + number field nf. If (optional) a is non-zero, first element will be equal to + a + +Function: idealval +Class: basic +Section: 6 +C-Name: idealval +Prototype: lGGG +Help: idealval(nf,x,p): valuation at p given in idealprimedec format of the + ideal x in the number field nf + +Function: ideleprincipal +Class: basic +Section: 6 +C-Name: principalidele +Prototype: GGp +Help: ideleprincipal(nf,x): returns the principal idele generated by the + algebraic number x in the number field nf + +Function: if +Class: basic +Section: 11 +Help: if(a,seq1,seq2): if a is nonzero, seq1 is evaluated, otherwise seq2. + seq1 and seq2 are optional, and if seq2 is omitted, the preceding comma can + be omitted also + +Function: imag +Class: basic +Section: 2 +C-Name: gimag +Prototype: G +Help: imag(x): imaginary part of x + +Function: incgam +Class: basic +Section: 3 +C-Name: incgam0 +Prototype: GGDGp +Help: incgam(s,x,{y}): incomplete gamma function. y is optional and is the + precomputed value of gamma(s) + +Function: incgamc +Class: basic +Section: 3 +C-Name: incgam3 +Prototype: GGp +Help: incgamc(s,x): complementary incomplete gamma function + +Function: input +Class: gp +Section: 11 +C-Name: input0 +Prototype: +Help: input(): read an expression from the input file or standard input + +Function: install +Class: highlevel +Section: 11 +C-Name: gpinstall +Prototype: vrrD\"\",r,D\"\",s, +Help: install(name,code,{gpname},{lib}): load from dynamic library 'lib' the + function 'name'. Assign to it the name 'gpname' in this GP session, with + argument code 'code'. If 'lib' is omitted use 'libpari.so'. If 'gpname' is + omitted, use 'name' + +Function: intformal +Class: basic +Section: 7 +C-Name: integ +Prototype: GDn +Help: intformal(x,{y}): formal integration of x with respect to the main + variable of y, or to the main variable of x if y is omitted + +Function: intnum +Class: basic +Section: 9 +C-Name: intnum0 +Prototype: V=GGED0,L,p +Help: intnum(X=a,b,s,{flag=0}): numerical integration of s (smooth in ]a,b[) + from a to b with respect to X. flag is optional and mean 0: default. s can + be evaluated exactly on [a,b]; 1: general function; 2: a or b can be plus or + minus infinity (chosen suitably), but of same sign; 3: s has only limits at + a or b + +Function: isfundamental +Class: basic +Section: 4 +C-Name: gisfundamental +Prototype: G +Help: isfundamental(x): true(1) if x is a fundamental discriminant + (including 1), false(0) if not +Description: + (int):bool isfundamental($1) + (gen):gen gisfundamental($1) + +Function: isprime +Class: basic +Section: 4 +C-Name: gisprime +Prototype: GD0,L, +Help: isprime(x,{flag=0}): if flag is omitted or 0, true(1) if x is a + (proven) prime number, false(0) if not. If flag is 1, the primality is + certified by the Pocklington-Lehmer Test. If flag is 2, the primality is + certified using the APRCL test. +Description: + (int, ?0):bool isprime($1) + (int, 1):bool plisprime($1, 0) + (int, 2):gen plisprime($1, 1) + (gen, ?small):gen gisprime($1, $2) + +Function: ispseudoprime +Class: basic +Section: 4 +C-Name: gispseudoprime +Prototype: GD0,L, +Help: ispseudoprime(x,{n}): true(1) if x is a strong pseudoprime, false(0) + if not. If n is 0 or omitted, use BPSW test, otherwise use strong + Rabin-Miller test for n randomly chosen bases +Description: + (int):bool ispsp($1) + (gen):gen gispsp($1) + +Function: issquare +Class: basic +Section: 4 +C-Name: gcarrecomplet +Prototype: GD& +Help: issquare(x,{&n}): true(1) if x is a square, false(0) if not. If n is + given puts the exact square root there if it was computed +Description: + (int):bool carreparfait($1) + (mp):int gcarreparfait($1) + (gen):gen gcarreparfait($1) + (int, &int):bool carrecomplet($1, &$2) + (gen, &gen):gen gcarrecomplet($1, &$2) + +Function: issquarefree +Class: basic +Section: 4 +C-Name: gissquarefree +Prototype: G +Help: issquarefree(x): true(1) if x is squarefree, false(0) if not +Description: + (int):bool issquarefree($1) + (gen):gen gissquarefree($1) + +Function: kill +Class: highlevel +Section: 11 +C-Name: kill0 +Prototype: vS +Help: kill(x): kills the present value of the variable or function x. + Returns new value or 0 + +Function: kronecker +Class: basic +Section: 4 +C-Name: gkronecker +Prototype: GG +Help: kronecker(x,y): kronecker symbol (x/y) +Description: + (small, small):small kross($1, $2) + (int, small):small krogs($1, $2) + (small, int):small krosg($1, $2) + (int, int):small kronecker($1, $2) + (gen, small):gen gkrogs($1, $2) + (gen, gen):gen gkronecker($1, $2) + +Function: lcm +Class: basic +Section: 4 +C-Name: glcm0 +Prototype: GDG +Help: lcm(x,{y}): least common multiple of x and y=x*y/gcd(x,y) +Description: + (int, int):int mpppcm($1, $2) + (gen):gen glcm0($1) + (gen, gen):gen glcm($1, $2) + +Function: length +Class: basic +Section: 2 +C-Name: glength +Prototype: lG +Help: length(x): number of non code words in x, number of characters for a + string +Description: + (vecsmall):lg lg($1) + (vec):lg lg($1) + (pol):small:parens lgef($1)-2 + (gen):small glength($1) + +Function: lex +Class: basic +Section: 1 +C-Name: lexcmp +Prototype: lGG +Help: lex(x,y): compare x and y lexicographically (1 if x>y, 0 if x=y, -1 if + x<y) + +Function: lift +Class: basic +Section: 2 +C-Name: lift0 +Prototype: GDn +Help: lift(x,{v}): lifts every element of Z/nZ to Z or T[x]/PT[x] to T[x] + for a type T if v is omitted, otherwise lift only polymods with main + variable v. If v does not occur in x, lift only intmods +Description: + (pol):pol lift($1) + (vec):vec lift($1) + (gen):gen lift($1) + (pol, var):pol lift0($1, $2) + (vec, var):vec lift0($1, $2) + (gen, var):gen lift0($1, $2) + +Function: lindep +Class: basic +Section: 8 +C-Name: lindep0 +Prototype: GD0,L,p +Help: lindep(x,{flag=0}): Z-linear dependencies between components of x. + flag is optional, and can be 0: default, using Hastad et al; positive, and + in that case should be between 0.5 and 1.0 times the accuracy in decimal + digits of x, using a standard LLL; or negative in which case it returns, + once a relation has been found + +Function: listcreate +Class: basic +Section: 8 +C-Name: listcreate +Prototype: L +Help: listcreate(n): creates an empty list of length n +Description: + (small):list listcreate($1) + +Function: listinsert +Class: basic +Section: 8 +C-Name: listinsert +Prototype: GGL +Help: listinsert(list,x,n): insert x at index n in list, shifting the + remaining elements to the right +Description: + (list, gen, small):gen listinsert($1, $2, $3) + +Function: listkill +Class: basic +Section: 8 +C-Name: listkill +Prototype: vG +Help: listkill(list): kills list + +Function: listput +Class: basic +Section: 8 +C-Name: listput +Prototype: GGD0,L, +Help: listput(list,x,{n}): sets n-th element of list equal to x. If n is + omitted or greater than the current list length, just append x +Description: + (list, gen, small):gen listput($1, $2, $3) + +Function: listsort +Class: basic +Section: 8 +C-Name: listsort +Prototype: GD0,L, +Help: listsort(list,{flag=0}): sort list in place. If flag is non-zero, + suppress all but one occurence of each element in list + +Function: lngamma +Class: basic +Section: 3 +C-Name: glngamma +Prototype: Gp +Help: lngamma(x): logarithm of the gamma function of x + +Function: log +Class: basic +Section: 99 +C-Name: log0 +Prototype: GD0,M,p\nAGM==1 +Help: log(x,{flag=0}): natural logarithm of x. flag is optional, and can be + 0: default, or 1: calls logagm, computed using the agm +Description: + (gen, ?0):gen:prec glog($1, prec) + (gen, 1):gen:prec glogagm($1, prec) + (gen, small):gen:prec log0($1, prec, $2) + +Function: matadjoint +Class: basic +Section: 8 +C-Name: adj +Prototype: G +Help: matadjoint(x): adjoint matrix of x + +Function: matalgtobasis +Class: basic +Section: 6 +C-Name: matalgtobasis +Prototype: GG +Help: matalgtobasis(nf,x): nfalgtobasis applied to every element of the + matrix x + +Function: matbasistoalg +Class: basic +Section: 6 +C-Name: matbasistoalg +Prototype: GG +Help: matbasistoalg(nf,x): nfbasistoalg applied to every element of the + matrix x + +Function: matcompanion +Class: basic +Section: 8 +C-Name: assmat +Prototype: G +Help: matcompanion(x): companion matrix to polynomial x + +Function: matdet +Class: basic +Section: 8 +C-Name: det0 +Prototype: GD0,L, +Help: matdet(x,{flag=0}): determinant of the matrix x using Gauss-Bareiss. + If (optional) flag is set to 1, use classical gaussian elimination (slightly + better for integer entries) +Description: + (gen, ?0):gen det($1) + (gen, 1):gen det2($1) + (gen, #small):gen $"incorrect flag in matdet" + (gen, small):gen det0($1, $2) + +Function: matdetint +Class: basic +Section: 8 +C-Name: detint +Prototype: G +Help: matdetint(x): some multiple of the determinant of the lattice + generated by the columns of x (0 if not of maximal rank). Useful with + mathnfmod + +Function: matdiagonal +Class: basic +Section: 8 +C-Name: diagonal +Prototype: G +Help: matdiagonal(x): creates the diagonal matrix whose diagonal entries are + the entries of the vector x + +Function: mateigen +Class: basic +Section: 8 +C-Name: eigen +Prototype: Gp +Help: mateigen(x): eigenvectors of the matrix x given as columns of a matrix + +Function: mathess +Class: basic +Section: 8 +C-Name: hess +Prototype: G +Help: mathess(x): Hessenberg form of x + +Function: mathilbert +Class: basic +Section: 8 +C-Name: mathilbert +Prototype: L +Help: mathilbert(n): Hilbert matrix of order n (n C-integer) + +Function: mathnf +Class: basic +Section: 8 +C-Name: mathnf0 +Prototype: GD0,L, +Help: mathnf(x,{flag=0}): (upper triangular) Hermite normal form of x, basis + for the lattice formed by the columns of x. flag is optional whose value + range from 0 to 4 (0 if omitted), meaning : 0: naive algorithm. 1: Use + Batut's algorithm. Output 2-component vector [H,U] such that H is the HNF of + x, and U is a unimodular matrix such that xU=H. 3: Use Batut's algorithm. + Output [H,U,P] as in 2. 4: as 1, using a heuristic variant of LLL reduction + along the way + +Function: mathnfmod +Class: basic +Section: 8 +C-Name: hnfmod +Prototype: GG +Help: mathnfmod(x,d): (upper triangular) Hermite normal form of x, basis for + the lattice formed by the columns of x, where d is a multiple of the + non-zero determinant of this lattice + +Function: mathnfmodid +Class: basic +Section: 8 +C-Name: hnfmodid +Prototype: GG +Help: mathnfmodid(x,d): (upper triangular) Hermite normal form of x + concatenated with d times the identity matrix + +Function: matid +Class: basic +Section: 8 +C-Name: idmat +Prototype: L +Help: matid(n): identity matrix of order n (n C-integer) + +Function: matimage +Class: basic +Section: 8 +C-Name: matimage0 +Prototype: GD0,L, +Help: matimage(x,{flag=0}): basis of the image of the matrix x. flag is + optional and can be set to 0 or 1, corresponding to two different algorithms + +Function: matimagecompl +Class: basic +Section: 8 +C-Name: imagecompl +Prototype: G +Help: matimagecompl(x): vector of column indices not corresponding to the + indices given by the function matimage + +Function: matindexrank +Class: basic +Section: 8 +C-Name: indexrank +Prototype: G +Help: matindexrank(x): gives two extraction vectors (rows and columns) for + the matrix x such that the extracted matrix is square of maximal rank + +Function: matintersect +Class: basic +Section: 8 +C-Name: intersect +Prototype: GG +Help: matintersect(x,y): intersection of the vector spaces whose bases are + the columns of x and y + +Function: matinverseimage +Class: basic +Section: 8 +C-Name: inverseimage +Prototype: GG +Help: matinverseimage(x,y): an element of the inverse image of the vector y + by the matrix x if one exists, the empty vector otherwise + +Function: matisdiagonal +Class: basic +Section: 8 +C-Name: isdiagonal +Prototype: lG +Help: matisdiagonal(x): true(1) if x is a diagonal matrix, false(0) + otherwise + +Function: matker +Class: basic +Section: 8 +C-Name: matker0 +Prototype: GD0,L, +Help: matker(x,{flag=0}): basis of the kernel of the matrix x. flag is + optional, and may be set to 0: default; non-zero: x is known to have + integral entries + +Function: matkerint +Class: basic +Section: 8 +C-Name: matkerint0 +Prototype: GD0,L, +Help: matkerint(x,{flag=0}): LLL-reduced Z-basis of the kernel of the matrix + x with integral entries. flag is optional, and may be set to 0: default, + uses a modified LLL, 1: uses matrixqz3 and the HNF, 2: uses another modified + LLL + +Function: matmuldiagonal +Class: basic +Section: 8 +C-Name: matmuldiagonal +Prototype: GG +Help: matmuldiagonal(x,d): product of matrix x by diagonal matrix whose + diagonal coefficients are those of the vector d, equivalent but faster than + x*matdiagonal(d) + +Function: matmultodiagonal +Class: basic +Section: 8 +C-Name: matmultodiagonal +Prototype: GG +Help: matmultodiagonal(x,y): product of matrices x and y, knowing that the + result will be a diagonal matrix. Much faster than general multiplication in + that case + +Function: matpascal +Class: basic +Section: 8 +C-Name: matqpascal +Prototype: LDG +Help: matpascal(n,{q}): Pascal triangle of order n if q is omited. q-Pascal + triangle otherwise + +Function: matrank +Class: basic +Section: 8 +C-Name: rank +Prototype: lG +Help: matrank(x): rank of the matrix x + +Function: matrix +Class: basic +Section: 8 +C-Name: matrice +Prototype: GGDVDVDI +Help: matrix(m,n,{X},{Y},{expr=0}): mXn matrix of expression expr, the row + variable X going from 1 to m and the column variable Y going from 1 to n. By + default, fill with 0s + +Function: matrixqz +Class: basic +Section: 8 +C-Name: matrixqz0 +Prototype: GG +Help: matrixqz(x,p): if p>=0, transforms the rational or integral mxn (m>=n) + matrix x into an integral matrix with gcd of maximal determinants equal to 1 + if p is equal to 0, not divisible by p otherwise. If p=-1, finds a basis of + the intersection with Z^n of the lattice spanned by the columns of x. If + p=-2, finds a basis of the intersection with Z^n of the Q-vector space + spanned by the columns of x + +Function: matsize +Class: basic +Section: 8 +C-Name: matsize +Prototype: G +Help: matsize(x): number of rows and columns of the vector/matrix x as a + 2-vector + +Function: matsnf +Class: basic +Section: 8 +C-Name: matsnf0 +Prototype: GD0,L, +Help: matsnf(x,{flag=0}): Smith normal form (i.e. elementary divisors) of + the matrix x, expressed as a vector d. Binary digits of flag mean 1: returns + [u,v,d] where d=u*x*v, otherwise only the diagonal d is returned, 2: allow + polynomial entries, otherwise assume x is integral, 4: removes all + information corresponding to entries equal to 1 in d + +Function: matsolve +Class: basic +Section: 8 +C-Name: gauss +Prototype: GG +Help: matsolve(M,B): gaussian solution of MX=B (M matrix, B column vector) + +Function: matsolvemod +Class: basic +Section: 8 +C-Name: matsolvemod0 +Prototype: GGGD0,L, +Help: matsolvemod(M,D,B,{flag=0}): one solution of system of congruences + MX=B mod D (M matrix, B and D column vectors). If (optional) flag is + non-null return all solutions + +Function: matsupplement +Class: basic +Section: 8 +C-Name: suppl +Prototype: G +Help: matsupplement(x): supplement the columns of the matrix x to an + invertible matrix + +Function: mattranspose +Class: basic +Section: 8 +C-Name: gtrans +Prototype: G +Help: mattranspose(x): x~=transpose of x + +Function: max +Class: basic +Section: 1 +C-Name: gmax +Prototype: GG +Help: max(x,y): maximum of x and y +Description: + (@small, @small):small max($1, $2) + (small, int):int gmaxsg($1, $2) + (int, small):int gmaxgs($1, $2) + (int, int):int gmax($1, $2) + (small, mp):mp gmaxsg($1, $2) + (mp, small):mp gmaxgs($1, $2) + (mp, mp):mp gmax($1, $2) + (small, gen):gen gmaxsg($1, $2) + (gen, small):gen gmaxgs($1, $2) + (gen, gen):gen gmax($1, $2) + +Function: min +Class: basic +Section: 1 +C-Name: gmin +Prototype: GG +Help: min(x,y): minimum of x and y +Description: + (@small, @small):small min($1, $2) + (small, int):int gminsg($1, $2) + (int, small):int gmings($1, $2) + (int, int):int gmin($1, $2) + (small, mp):mp gminsg($1, $2) + (mp, small):mp gmings($1, $2) + (mp, mp):mp gmin($1, $2) + (small, gen):gen gminsg($1, $2) + (gen, small):gen gmings($1, $2) + (gen, gen):gen gmin($1, $2) + +Function: modreverse +Class: basic +Section: 6 +C-Name: polymodrecip +Prototype: G +Help: modreverse(x): reverse polymod of the polymod x, if it exists + +Function: moebius +Class: basic +Section: 4 +C-Name: gmu +Prototype: G +Help: moebius(x): Moebius function of x +Description: + (int):small mu($1) + (gen):gen gmu($1) + +Function: newtonpoly +Class: basic +Section: 6 +C-Name: newtonpoly +Prototype: GG +Help: newtonpoly(x,p): Newton polygon of polynomial x with respect to the + prime p + +Function: next +Class: basic +Section: 11 +C-Name: next0 +Prototype: D1,L, +Help: next({n=1}): interrupt execution of current instruction sequence, and + start another iteration from the n-th innermost enclosing loops + +Function: nextprime +Class: basic +Section: 4 +C-Name: gnextprime +Prototype: G +Help: nextprime(x): smallest prime number>=x +Description: + (int):int nextprime($1) + (gen):gen gnextprime($1) + +Function: nfalgtobasis +Class: basic +Section: 6 +C-Name: algtobasis +Prototype: GG +Help: nfalgtobasis(nf,x): transforms the algebraic number x into a column + vector on the integral basis nf.zk + +Function: nfbasis +Class: basic +Section: 6 +C-Name: nfbasis0 +Prototype: GD0,L,DG +Help: nfbasis(x,{flag=0},{p}): integral basis of the field Q[a], where a is + a root of the polynomial x, using the round 4 algorithm. Second and third + args are optional. Binary digits of flag mean 1: assume that no square of a + prime>primelimit divides the discriminant of x, 2: use round 2 algorithm + instead. If present, p provides the matrix of a partial factorization of the + discriminant of x, useful if one wants only an order maximal at certain + primes only + +Function: nfbasistoalg +Class: basic +Section: 6 +C-Name: basistoalg +Prototype: GG +Help: nfbasistoalg(nf,x): transforms the column vector x on the integral + basis into an algebraic number + +Function: nfdetint +Class: basic +Section: 6 +C-Name: nfdetint +Prototype: GG +Help: nfdetint(nf,x): multiple of the ideal determinant of the pseudo + generating set x + +Function: nfdisc +Class: basic +Section: 6 +C-Name: nfdiscf0 +Prototype: GD0,L,DG +Help: nfdisc(x,{flag=0},{p}): discriminant of the number field defined by + the polynomial x using round 4. Optional args flag and p are as in nfbasis + +Function: nfeltdiv +Class: basic +Section: 6 +C-Name: element_div +Prototype: GGG +Help: nfeltdiv(nf,a,b): element a/b in nf + +Function: nfeltdiveuc +Class: basic +Section: 6 +C-Name: nfdiveuc +Prototype: GGG +Help: nfeltdiveuc(nf,a,b): gives algebraic integer q such that a-bq is small + +Function: nfeltdivmodpr +Class: basic +Section: 6 +C-Name: element_divmodpr +Prototype: GGGG +Help: nfeltdivmodpr(nf,a,b,pr): element a/b modulo pr in nf, where pr is in + modpr format (see nfmodprinit) + +Function: nfeltdivrem +Class: basic +Section: 6 +C-Name: nfdivres +Prototype: GGG +Help: nfeltdivrem(nf,a,b): gives [q,r] such that r=a-bq is small + +Function: nfeltmod +Class: basic +Section: 6 +C-Name: nfmod +Prototype: GGG +Help: nfeltmod(nf,a,b): gives r such that r=a-bq is small with q algebraic + integer + +Function: nfeltmul +Class: basic +Section: 6 +C-Name: element_mul +Prototype: GGG +Help: nfeltmul(nf,a,b): element a. b in nf + +Function: nfeltmulmodpr +Class: basic +Section: 6 +C-Name: element_mulmodpr +Prototype: GGGG +Help: nfeltmulmodpr(nf,a,b,pr): element a. b modulo pr in nf, where pr is in + modpr format (see nfmodprinit) + +Function: nfeltpow +Class: basic +Section: 6 +C-Name: element_pow +Prototype: GGG +Help: nfeltpow(nf,a,k): element a^k in nf + +Function: nfeltpowmodpr +Class: basic +Section: 6 +C-Name: element_powmodpr +Prototype: GGGG +Help: nfeltpowmodpr(nf,a,k,pr): element a^k modulo pr in nf, where pr is in + modpr format (see nfmodprinit) + +Function: nfeltreduce +Class: basic +Section: 6 +C-Name: element_reduce +Prototype: GGG +Help: nfeltreduce(nf,a,id): gives r such that a-r is in the ideal id and r + is small + +Function: nfeltreducemodpr +Class: basic +Section: 6 +C-Name: nfreducemodpr +Prototype: GGG +Help: nfeltreducemodpr(nf,a,pr): element a modulo pr in nf, where pr is in + modpr format (see nfmodprinit) + +Function: nfeltval +Class: basic +Section: 6 +C-Name: element_val +Prototype: lGGG +Help: nfeltval(nf,a,pr): valuation of element a at the prime pr as output by + idealprimedec + +Function: nffactor +Class: basic +Section: 6 +C-Name: nffactor +Prototype: GG +Help: nffactor(nf,x): factor polynomial x in number field nf + +Function: nffactormod +Class: basic +Section: 6 +C-Name: nffactormod +Prototype: GGG +Help: nffactormod(nf,pol,pr): factorize polynomial pol modulo prime ideal pr + in number field nf + +Function: nfgaloisapply +Class: basic +Section: 6 +C-Name: galoisapply +Prototype: GGG +Help: nfgaloisapply(nf,aut,x): Apply the Galois automorphism sigma + (polynomial or polymod) to the object x (element or ideal) in the number + field nf + +Function: nfgaloisconj +Class: basic +Section: 6 +C-Name: galoisconj0 +Prototype: GD0,L,DGp +Help: nfgaloisconj(nf,{flag=0},{den}): list of conjugates of a root of the + polynomial x=nf.pol in the same number field. flag is optional (set to 0 by + default), meaning 0: use combination of flag 4 and 1, always complete; 1: + use nfroots; 2 : use complex numbers, LLL on integral basis (not always + complete); 4: use Allombert's algorithm, complete if the field is Galois of + degree <= 35 (see manual for detail). nf can be simply a polynomial with + flag 0,2 and 4, meaning: 0: use combination of flag 4 and 2, not always + complete (but a warning is issued when the list is not proven complete); 2 & + 4: same meaning and restrictions. Note that only flag 4 can be applied to + fields of large degrees (approx. >= 20) + +Function: nfhilbert +Class: basic +Section: 6 +C-Name: nfhilbert0 +Prototype: lGGGDG +Help: nfhilbert(nf,a,b,{p}): if p is omitted, global Hilbert symbol (a,b) in + nf, that is 1 if X^2-aY^2-bZ^2 has a non-trivial solution (X,Y,Z) in nf, -1 + otherwise. Otherwise compute the local symbol modulo the prime ideal p + +Function: nfhnf +Class: basic +Section: 6 +C-Name: nfhermite +Prototype: GG +Help: nfhnf(nf,x): if x=[A,I], gives a pseudo-basis of the module sum A_jI_j + +Function: nfhnfmod +Class: basic +Section: 6 +C-Name: nfhermitemod +Prototype: GGG +Help: nfhnfmod(nf,x,detx): if x=[A,I], and detx is a multiple of the ideal + determinant of x, gives a pseudo-basis of the module sum A_jI_j + +Function: nfinit +Class: basic +Section: 6 +C-Name: nfinit0 +Prototype: GD0,L,p +Help: nfinit(pol,{flag=0}): pol being a nonconstant irreducible polynomial, + gives the vector: [pol,[r1,r2],discf,index,[M,MC,T2,T,different] (see + manual),r1+r2 first roots, integral basis, matrix of power basis in terms of + integral basis, multiplication table of basis]. flag is optional and can be + set to 0: default; 1: do not compute different; 2: first use polred to find + a simpler polynomial; 3: outputs a two-element vector [nf,Mod(a,P)], where + nf is as in 2 and Mod(a,P) is a polymod equal to Mod(x,pol) and P=nf.pol; 4: + as 2 but use a partial polred; 5: is to 3 what 4 is to 2 +Description: + (gen, ?0):nf:prec nfinit0($1, 0, prec) + (gen, 1):nf:prec nfinit0($1, 1, prec) + (gen, 2):nf:prec nfinit0($1, 2, prec) + (gen, 3):gen:prec nfinit0($1, 3, prec) + (gen, 4):nf:prec nfinit0($1, 4, prec) + (gen, 5):gen:prec nfinit0($1, 5, prec) + (gen, 6):nf:prec nfinit0($1, 6, prec) + (gen, #small):void $"incorrect flag in nfinit" + (gen, small):gen:prec nfinit0($1, $2, prec) + +Function: nfisideal +Class: basic +Section: 6 +C-Name: isideal +Prototype: lGG +Help: nfisideal(nf,x): true(1) if x is an ideal in the number field nf, + false(0) if not + +Function: nfisincl +Class: basic +Section: 6 +C-Name: nfisincl +Prototype: GG +Help: nfisincl(x,y): tests whether the number field x is isomorphic to a + subfield of y (where x and y are either polynomials or number fields as + output by nfinit). Return 0 if not, and otherwise all the isomorphisms. If y + is a number field, a faster algorithm is used + +Function: nfisisom +Class: basic +Section: 6 +C-Name: nfisisom +Prototype: GG +Help: nfisisom(x,y): as nfisincl but tests whether x is isomorphic to y + +Function: nfkermodpr +Class: basic +Section: 6 +C-Name: nfkermodpr +Prototype: GGG +Help: nfkermodpr(nf,x,pr): kernel of the matrix x in Z_K/pr, where pr is in + modpr format (see nfmodprinit) + +Function: nfmodprinit +Class: basic +Section: 6 +C-Name: nfmodprinit +Prototype: GG +Help: nfmodprinit(nf,pr): transform the 5 element row vector pr representing + a prime ideal into modpr format necessary for all operations mod pr in the + number field nf (see manual for details about the format) + +Function: nfnewprec +Class: basic +Section: 6 +C-Name: nfnewprec +Prototype: Gp +Help: nfnewprec(nf): transform the number field data nf into new data using + the current (usually larger) precision + +Function: nfroots +Class: basic +Section: 6 +C-Name: nfroots +Prototype: DGG +Help: nfroots({nf},pol): roots of polynomial pol belonging to nf (Q if + omitted) without multiplicity + +Function: nfrootsof1 +Class: basic +Section: 6 +C-Name: rootsof1 +Prototype: G +Help: nfrootsof1(nf): number of roots of unity and primitive root of unity + in the number field nf + +Function: nfsnf +Class: basic +Section: 6 +C-Name: nfsmith +Prototype: GG +Help: nfsnf(nf,x): if x=[A,I,J], outputs [c_1,...c_n] Smith normal form of x + +Function: nfsolvemodpr +Class: basic +Section: 6 +C-Name: nfsolvemodpr +Prototype: GGGG +Help: nfsolvemodpr(nf,a,b,pr): solution of a*x=b in Z_K/pr, where a is a + matrix and b a column vector, and where pr is in modpr format (see + nfmodprinit) + +Function: nfsubfields +Class: basic +Section: 6 +C-Name: subfields0 +Prototype: GDG +Help: nfsubfields(nf,{d=0}): find all subfields of degree d of number field + nf (all subfields if d is null or omitted). Result is a vector of subfields, + each being given by [g,h], where g is an absolute equation and h expresses + one of the roots of g in terms of the root x of the polynomial defining nf + +Function: norm +Class: basic +Section: 2 +C-Name: gnorm +Prototype: G +Help: norm(x): norm of x + +Function: norml2 +Class: basic +Section: 2 +C-Name: gnorml2 +Prototype: G +Help: norml2(x): square of the L2-norm of the vector x + +Function: numbpart +Class: basic +Section: 4 +C-Name: numbpart +Prototype: G +Help: numbpart(x): number of partitions of x + +Function: numdiv +Class: basic +Section: 4 +C-Name: gnumbdiv +Prototype: G +Help: numdiv(x): number of divisors of x +Description: + (int):int numbdiv($1) + (gen):gen gnumbdiv($1) + +Function: numerator +Class: basic +Section: 2 +C-Name: numer +Prototype: G +Help: numerator(x): numerator of x + +Function: numtoperm +Class: basic +Section: 2 +C-Name: numtoperm +Prototype: LG +Help: numtoperm(n,k): permutation number k (mod n!) of n letters (n + C-integer) + +Function: omega +Class: basic +Section: 4 +C-Name: gomega +Prototype: G +Help: omega(x): number of distinct prime divisors of x +Description: + (int):small omega($1) + (gen):gen gomega($1) + +Function: padicappr +Class: basic +Section: 7 +C-Name: apprgen9 +Prototype: GG +Help: padicappr(x,a): p-adic roots of the polynomial x congruent to a mod p + +Function: padicprec +Class: basic +Section: 2 +C-Name: padicprec +Prototype: lGG +Help: padicprec(x,p): absolute p-adic precision of object x + +Function: permtonum +Class: basic +Section: 2 +C-Name: permtonum +Prototype: G +Help: permtonum(vect): ordinal (between 1 and n!) of permutation vect + +Function: plot +Class: highlevel +Section: 10 +C-Name: plot +Prototype: vV=GGIDGDGp +Help: plot(X=a,b,expr,{ymin},{ymax}): crude plot of expression expr, X goes + from a to b, with Y ranging from ymin to ymax. If ymin (resp. ymax) is not + given, the minima (resp. the maxima) of the expression is used instead + +Function: plotbox +Class: highlevel +Section: 10 +C-Name: rectbox +Prototype: vLGG +Help: plotbox(w,x2,y2): if the cursor is at position (x1,y1), draw a box + with diagonal (x1,y1) and (x2,y2) in rectwindow w (cursor does not move) + +Function: plotclip +Class: highlevel +Section: 10 +C-Name: rectclip +Prototype: vL +Help: plotclip(w): clip the contents of the rectwindow to the bounding box + (except strings) + +Function: plotcolor +Class: highlevel +Section: 10 +C-Name: rectcolor +Prototype: vLL +Help: plotcolor(w,c): in rectwindow w, set default color to c. Possible + values for c are 1=black, 2=blue, 3=sienna, 4=red, 5=cornsilk, 6=grey, + 7=gainsborough + +Function: plotcopy +Class: highlevel +Section: 10 +C-Name: rectcopy_gen +Prototype: vLLGGD0,L, +Help: plotcopy(sourcew,destw,dx,dy,{flag=0}): copy the contents of + rectwindow sourcew to rectwindow destw with offset (dx,dy). If flag's bit 1 + is set, dx and dy express fractions of the size of the current output + device, otherwise dx and dy are in pixels. dx and dy are relative positions + of northwest corners if other bits of flag vanish, otherwise of: 2: + southwest, 4: southeast, 6: northeast corners + +Function: plotcursor +Class: highlevel +Section: 10 +C-Name: rectcursor +Prototype: L +Help: plotcursor(w): current position of cursor in rectwindow w + +Function: plotdraw +Class: highlevel +Section: 10 +C-Name: rectdraw_flag +Prototype: vGD0,L, +Help: plotdraw(list, {flag=0}): draw vector of rectwindows list at indicated + x,y positions; list is a vector w1,x1,y1,w2,x2,y2,etc. . If flag!=0, x1, y1 + etc. express fractions of the size of the current output device + +Function: plotfile +Class: highlevel +Section: 10 +C-Name: plot_outfile_set +Prototype: ls +Help: plotfile(filename): set the output file for plotting output. \"-\" + redirects to the same place as PARI output + +Function: ploth +Class: highlevel +Section: 10 +C-Name: ploth +Prototype: V=GGIpD0,M,D0,L,\nParametric|1; Recursive|2; no_Rescale|4; no_X_axis|8; no_Y_axis|16; no_Frame|32; no_Lines|64; Points_too|128; Splines|256; no_X_ticks|512; no_Y_ticks|1024; Same_ticks|2048 +Help: ploth(X=a,b,expr,{flags=0},{n=0}): plot of expression expr, X goes + from a to b in high resolution. Both flags and n are optional. Binary digits + of flags mean: 1=Parametric, 2=Recursive, 4=no_Rescale, 8=no_X_axis, + 16=no_Y_axis, 32=no_Frame, 64=no_Lines (do not join points), 128=Points_too + (plot both lines and points), 256=Splines (use cubic splines), + 512=no_X_ticks, 1024= no_Y_ticks, 2048=Same_ticks (plot all ticks with the + same length). n specifies number of reference points on the graph (0=use + default value). Returns a vector for the bounding box + +Function: plothraw +Class: highlevel +Section: 10 +C-Name: plothraw +Prototype: GGD0,L, +Help: plothraw(listx,listy,{flag=0}): plot in high resolution points whose x + (resp. y) coordinates are in listx (resp. listy). If flag is 1, join points, + other non-0 flags should be combinations of bits 8,16,32,64,128,256 meaning + the same as for ploth() + +Function: plothsizes +Class: highlevel +Section: 10 +C-Name: plothsizes_flag +Prototype: D0,L, +Help: plothsizes({flag=0}): returns array of 6 elements: terminal width and + height, sizes for ticks in horizontal and vertical directions, width and + height of characters. If flag=0, sizes of ticks and characters are in + pixels, otherwise are fractions of the screen size + +Function: plotinit +Class: highlevel +Section: 10 +C-Name: initrect_gen +Prototype: vLD0,G,D0,G,D0,L, +Help: plotinit(w,{x=0},{y=0},{flag=0}): initialize rectwindow w to size x,y. + If flag!=0, x and y express fractions of the size of the current output + device. x=0 or y=0 means use the full size of the device + +Function: plotkill +Class: highlevel +Section: 10 +C-Name: killrect +Prototype: vL +Help: plotkill(w): erase the rectwindow w + +Function: plotlines +Class: highlevel +Section: 10 +C-Name: rectlines +Prototype: vLGGD0,L, +Help: plotlines(w,listx,listy,{flag=0}): draws an open polygon in rectwindow + w where listx and listy contain the x (resp. y) coordinates of the vertices. + If listx and listy are both single values (i.e not vectors), draw the + corresponding line (and move cursor). If (optional) flag is non-zero, close + the polygon + +Function: plotlinetype +Class: highlevel +Section: 10 +C-Name: rectlinetype +Prototype: vLL +Help: plotlinetype(w,type): change the type of following lines in rectwindow + w. type -2 corresponds to frames, -1 to axes, larger values may correspond + to something else. w=-1 changes highlevel plotting + +Function: plotmove +Class: highlevel +Section: 10 +C-Name: rectmove +Prototype: vLGG +Help: plotmove(w,x,y): move cursor to position x,y in rectwindow w + +Function: plotpoints +Class: highlevel +Section: 10 +C-Name: rectpoints +Prototype: vLGG +Help: plotpoints(w,listx,listy): draws in rectwindow w the points whose x + (resp y) coordinates are in listx (resp listy). If listx and listy are both + single values (i.e not vectors), draw the corresponding point (and move + cursor) + +Function: plotpointsize +Class: highlevel +Section: 10 +C-Name: rectpointsize +Prototype: vLG +Help: plotpointsize(w,size): change the \"size\" of following points in + rectwindow w. w=-1 changes global value + +Function: plotpointtype +Class: highlevel +Section: 10 +C-Name: rectpointtype +Prototype: vLL +Help: plotpointtype(w,type): change the type of following points in + rectwindow w. type -1 corresponds to a dot, larger values may correspond to + something else. w=-1 changes highlevel plotting + +Function: plotrbox +Class: highlevel +Section: 10 +C-Name: rectrbox +Prototype: vLGG +Help: plotrbox(w,dx,dy): if the cursor is at (x1,y1), draw a box with + diagonal (x1,y1)-(x1+dx,y1+dy) in rectwindow w (cursor does not move) + +Function: plotrecth +Class: highlevel +Section: 10 +C-Name: rectploth +Prototype: LV=GGIpD0,L,D0,L, +Help: plotrecth(w,X=xmin,xmax,expr,{flags=0},{n=0}): plot graph(s) for expr + in rectwindow w, where expr is scalar for a single non-parametric plot, and + a vector otherwise. If plotting is parametric, its length should be even and + pairs of entries give points coordinates. If not, all entries but the first + are y-coordinates. Both flags and n are optional. Binary digits of flags + mean: 1 parametric plot, 2 recursive plot, 4 do not rescale w, 8 omit + x-axis, 16 omit y-axis, 32 omit frame, 64 do not join points, 128 plot both + lines and points. n specifies the number of reference points on the graph + (0=use default value). Returns a vector for the bounding box + +Function: plotrecthraw +Class: highlevel +Section: 10 +C-Name: rectplothraw +Prototype: LGD0,L, +Help: plotrecthraw(w,data,{flags=0}): plot graph(s) for data in rectwindow + w, where data is a vector of vectors. If plot is parametric, length of data + should be even, and pairs of entries give curves to plot. If not, first + entry gives x-coordinate, and the other ones y-coordinates. Admits the same + optional flags as plotrecth, save that recursive plot is meaningless + +Function: plotrline +Class: highlevel +Section: 10 +C-Name: rectrline +Prototype: vLGG +Help: plotrline(w,dx,dy): if the cursor is at (x1,y1), draw a line from + (x1,y1) to (x1+dx,y1+dy) (and move the cursor) in the rectwindow w + +Function: plotrmove +Class: highlevel +Section: 10 +C-Name: rectrmove +Prototype: vLGG +Help: plotrmove(w,dx,dy): move cursor to position (dx,dy) relative to the + present position in the rectwindow w + +Function: plotrpoint +Class: highlevel +Section: 10 +C-Name: rectrpoint +Prototype: vLGG +Help: plotrpoint(w,dx,dy): draw a point (and move cursor) at position dx,dy + relative to present position of the cursor in rectwindow w + +Function: plotscale +Class: highlevel +Section: 10 +C-Name: rectscale +Prototype: vLGGGG +Help: plotscale(w,x1,x2,y1,y2): scale the coordinates in rectwindow w so + that x goes from x1 to x2 and y from y1 to y2 (y2<y1 is allowed) + +Function: plotstring +Class: highlevel +Section: 10 +C-Name: rectstring3 +Prototype: vLsD0,L, +Help: plotstring(w,x,{flags=0}): draw in rectwindow w the string + corresponding to x. Bits 1 and 2 of flag regulate horizontal alignment: left + if 0, right if 2, center if 1. Bits 4 and 8 regulate vertical alignment: + bottom if 0, top if 8, v-center if 4. Can insert additional gap between + point and string: horizontal if bit 16 is set, vertical if bit 32 is set + +Function: plotterm +Class: highlevel +Section: 10 +C-Name: term_set +Prototype: ls +Help: plotterm(\"termname\"): set terminal to plot in high resolution to. + Ignored by some drivers. In gnuplot driver possible terminals are the same + as in gnuplot, terminal options can be put after the terminal name and + space; terminal size can be put immediately after the name, as in + \"gif=300,200\". If term is \"?\", lists possible values. Positive return + value means success + +Function: polcoeff +Class: basic +Section: 7 +C-Name: polcoeff0 +Prototype: GLDn +Help: polcoeff(x,s,{v}): coefficient of degree s of x, or the s-th component + for vectors or matrices (for which it is simpler to use x[]). With respect + to the main variable if v is omitted, with respect to the variable v + otherwise +Description: + (pol, small):gen:parens:copy (GEN)$(1)[$(2)+2] + (gen, small):gen polcoeff0($1, $2, -1) + (gen, small, var):gen polcoeff0($1, $2, -1) + +Function: polcompositum +Class: basic +Section: 6 +C-Name: polcompositum0 +Prototype: GGD0,L, +Help: polcompositum(pol1,pol2,{flag=0}): vector of all possible compositums + of the number fields defined by the polynomials pol1 and pol2. If (optional) + flag is set (i.e non-null), output for each compositum, not only the + compositum polynomial pol, but a vector [pol,al1,al2,k] where al1 (resp. + al2) is a root of pol1 (resp. pol2) expressed as a polynomial modulo pol, + and a small integer k such that al2+k*al1 is the chosen root of pol + +Function: polcyclo +Class: basic +Section: 7 +C-Name: cyclo +Prototype: LDn +Help: polcyclo(n,{v=x}): n-th cyclotomic polynomial (in variable v) + +Function: poldegree +Class: basic +Section: 7 +C-Name: poldegree +Prototype: lGDn +Help: poldegree(x,{v}): degree of the polynomial or rational function x with + respect to main variable if v is omitted, with respect to v otherwise. + Return -1 if x = 0, and 0 if it's a non-zero scalar +Description: + (pol):small:parens lgef($1)-3 + (gen):small degree($1) + (gen, var):small poldegree($1, $2) + +Function: poldisc +Class: basic +Section: 7 +C-Name: poldisc0 +Prototype: GDn +Help: poldisc(x,{v}): discriminant of the polynomial x, with respect to main + variable if v is omitted, with respect to v otherwise +Description: + (pol):gen discsr($1) + (gen):gen poldisc0($1, -1) + (gen, var):gen poldisc0($1, $2) + +Function: poldiscreduced +Class: basic +Section: 7 +C-Name: reduceddiscsmith +Prototype: G +Help: poldiscreduced(f): vector of elementary divisors of Z[a]/f'(a)Z[a], + where a is a root of the polynomial f + +Function: polgalois +Class: basic +Section: 6 +C-Name: galois +Prototype: Gp +Help: polgalois(x): Galois group of the polynomial x (see manual for group + coding) + +Function: polhensellift +Class: basic +Section: 7 +C-Name: polhensellift +Prototype: GGGL +Help: polhensellift(x, y, p, e): lift the factorization y of x modulo p to a + factorization modulo p^e using Hensel lift. The factors in y must be + pairwise relatively prime modulo p + +Function: polinterpolate +Class: basic +Section: 7 +C-Name: polint +Prototype: GDGDGD& +Help: polinterpolate(xa,{ya},{x},{&e}): polynomial interpolation at x + according to data vectors xa, ya (ie return P such that P(xa[i]) = ya[i] for + all i). If ya is omitter, return P such that P(i) = xa[i]. If present, e + will contain an error estimate on the returned value + +Function: polisirreducible +Class: basic +Section: 7 +C-Name: gisirreducible +Prototype: G +Help: polisirreducible(x): true(1) if x is an irreducible non-constant + polynomial, false(0) if x is reducible or constant + +Function: pollead +Class: basic +Section: 7 +C-Name: pollead +Prototype: GDn +Help: pollead(x,{v}): leading coefficient of polynomial or series x, or x + itself if x is a scalar. Error otherwise. With respect to the main variable + of x if v is omitted, with respect to the variable v otherwise +Description: + (@pol):gen:parens:copy (GEN)$(1)[lgef($1)-1] + (gen):gen pollead($1, -1) + (gen, var):gen pollead($1, $2) + +Function: pollegendre +Class: basic +Section: 7 +C-Name: legendre +Prototype: LDn +Help: pollegendre(n,{v=x}): legendre polynomial of degree n (n C-integer), + in variable v + +Function: polrecip +Class: basic +Section: 7 +C-Name: polrecip +Prototype: G +Help: polrecip(x): reciprocal polynomial of x + +Function: polred +Class: basic +Section: 6 +C-Name: polred0 +Prototype: GD0,L,DG +Help: polred(x,{flag=0},{p}): reduction of the polynomial x (gives minimal + polynomials only). Second and third args are optional. The following binary + digits of flag are significant 1: partial reduction, 2: gives also elements. + p, if present, contains the complete factorization matrix of the + discriminant + +Function: polredabs +Class: basic +Section: 6 +C-Name: polredabs0 +Prototype: GD0,L, +Help: polredabs(x,{flag=0}): a smallest generating polynomial of the number + field for the T2 norm on the roots, with smallest index for the minimal T2 + norm. flag is optional, whose binary digit mean 1: give the element whose + characteristic polynomial is the given polynomial. 4: give all polynomials + of minimal T2 norm (give only one of P(x) and P(-x)). 16: partial reduction + +Function: polredord +Class: basic +Section: 6 +C-Name: ordred +Prototype: G +Help: polredord(x): reduction of the polynomial x, staying in the same order + +Function: polresultant +Class: basic +Section: 7 +C-Name: polresultant0 +Prototype: GGDnD0,L, +Help: polresultant(x,y,{v},{flag=0}): resultant of the polynomials x and y, + with respect to the main variables of x and y if v is omitted, with respect + to the variable v otherwise. flag is optional, and can be 0: default, + assumes that the polynomials have exact entries (uses the subresultant + algorithm), 1 for arbitrary polynomials, using Sylvester's matrix, or 2: + using a Ducos's modified subresultant algorithm + +Function: polroots +Class: basic +Section: 7 +C-Name: roots0 +Prototype: GD0,L,p +Help: polroots(x,{flag=0}): complex roots of the polynomial x. flag is + optional, and can be 0: default, uses Schonhage's method modified by + Gourdon, or 1: uses a modified Newton method + +Function: polrootsmod +Class: basic +Section: 7 +C-Name: rootmod0 +Prototype: GGD0,L, +Help: polrootsmod(x,p,{flag=0}): roots mod p of the polynomial x. flag is + optional, and can be 0: default, or 1: use a naive search, useful for small + p +Description: + (pol, int, ?0):vec rootmod($1, $2) + (pol, int, 1):vec rootmod2($1, $2) + (pol, int, #small):vec $"Bad flag in polrootsmod" + (pol, int, small):vec rootmod0($1, $2, $3) + +Function: polrootspadic +Class: basic +Section: 7 +C-Name: rootpadic +Prototype: GGL +Help: polrootspadic(x,p,r): p-adic roots of the polynomial x to precision r + +Function: polsturm +Class: basic +Section: 7 +C-Name: sturmpart +Prototype: lGDGDG +Help: polsturm(x,{a},{b}): number of real roots of the polynomial x in the + interval]a,b] (which are respectively taken to be -oo or +oo when omitted) + +Function: polsubcyclo +Class: basic +Section: 7 +C-Name: polsubcyclo +Prototype: LLDn +Help: polsubcyclo(n,d,{v=x}): finds an equation (in variable v) for the d-th + degree subfields of Q(zeta_n). Output is a polynomial or a vector of + polynomials is there are several such fields, or none. + +Function: polsylvestermatrix +Class: basic +Section: 7 +C-Name: sylvestermatrix +Prototype: GG +Help: polsylvestermatrix(x,y): forms the sylvester matrix associated to the + two polynomials x and y. Warning: the polynomial coefficients are in + columns, not in rows + +Function: polsym +Class: basic +Section: 7 +C-Name: polsym +Prototype: GL +Help: polsym(x,n): vector of symmetric powers of the roots of x up to n + +Function: poltchebi +Class: basic +Section: 7 +C-Name: tchebi +Prototype: LDn +Help: poltchebi(n,{v=x}): Tchebitcheff polynomial of degree n (n C-integer), + in variable v + +Function: poltschirnhaus +Class: basic +Section: 6 +C-Name: tschirnhaus +Prototype: G +Help: poltschirnhaus(x): random Tschirnhausen transformation of the + polynomial x + +Function: polylog +Class: basic +Section: 3 +C-Name: polylog0 +Prototype: LGD0,L,p +Help: polylog(m,x,{flag=0}): m-th polylogarithm of x. flag is optional, and + can be 0: default, 1: D_m~-modified m-th polylog of x, 2: D_m-modified m-th + polylog of x, 3: P_m-modified m-th polylog of x + +Function: polzagier +Class: basic +Section: 7 +C-Name: polzag +Prototype: LL +Help: polzagier(n,m): Zagier's polynomials of index n,m + +Function: precision +Class: basic +Section: 2 +C-Name: precision0 +Prototype: GD0,L, +Help: precision(x,{n}): change the precision of x to be n (n C-integer). If + n is omitted, output real precision of object x + +Function: precprime +Class: basic +Section: 4 +C-Name: gprecprime +Prototype: G +Help: precprime(x): largest prime number<=x, 0 if x<=1 +Description: + (int):int precprime($1) + (gen):gen gprecprime($1) + +Function: prime +Class: basic +Section: 4 +C-Name: prime +Prototype: L +Help: prime(n): returns the n-th prime (n C-integer) + +Function: primes +Class: basic +Section: 4 +C-Name: primes +Prototype: L +Help: primes(n): returns the vector of the first n primes (n C-integer) + +Function: print +Class: gp +Section: 11 +C-Name: print +Prototype: vs* +Help: print(a): outputs a (in raw format) ending with newline + +Function: print1 +Class: gp +Section: 11 +C-Name: print1 +Prototype: vs* +Help: print1(a): outputs a (in raw format) without ending with newline + +Function: printp +Class: gp +Section: 11 +C-Name: printp +Prototype: vs* +Help: printp(a): outputs a (in beautified format) ending with newline + +Function: printp1 +Class: gp +Section: 11 +C-Name: printp1 +Prototype: vs* +Help: printp1(a): outputs a (in beautified format) without ending with + newline + +Function: printtex +Class: gp +Section: 11 +C-Name: printtex +Prototype: vs* +Help: printtex(a): outputs a in TeX format + +Function: prod +Class: basic +Section: 9 +C-Name: produit +Prototype: V=GGEDG +Help: prod(X=a,b,expr,{x=1}): x times the product (X runs from a to b) of + expression + +Function: prodeuler +Class: basic +Section: 9 +C-Name: prodeuler +Prototype: V=GGEp +Help: prodeuler(X=a,b,expr): Euler product (X runs over the primes between a + and b) of real or complex expression + +Function: prodinf +Class: basic +Section: 9 +C-Name: prodinf0 +Prototype: V=GED0,L,p +Help: prodinf(X=a,expr,{flag=0}): infinite product (X goes from a to + infinity) of real or complex expression. flag can be 0 (default) or 1, in + which case compute the product of the 1+expr instead + +Function: psdraw +Class: highlevel +Section: 10 +C-Name: postdraw_flag +Prototype: vGD0,L, +Help: psdraw(list, {flag=0}): same as plotdraw, except that the output is a + postscript program in psfile (pari.ps by default), and flag!=0 scales the + plot from size of the current output device to the standard postscript + plotting size + +Function: psi +Class: basic +Section: 3 +C-Name: gpsi +Prototype: Gp +Help: psi(x): psi-function at x + +Function: psploth +Class: highlevel +Section: 10 +C-Name: postploth +Prototype: V=GGIpD0,L,D0,L, +Help: psploth(X=a,b,expr,{flags=0},{n=0}): same as ploth, except that the + output is a postscript program in psfile (pari.ps by default) + +Function: psplothraw +Class: highlevel +Section: 10 +C-Name: postplothraw +Prototype: GGD0,L, +Help: psplothraw(listx,listy,{flag=0}): same as plothraw, except that the + output is a postscript program in psfile (pari.ps by default) + +Function: qfbclassno +Class: basic +Section: 4 +C-Name: qfbclassno0 +Prototype: GD0,L, +Help: qfbclassno(x,{flag=0}): class number of discriminant x using Shanks's + method by default. If (optional) flag is set to 1, use Euler products + +Function: qfbcompraw +Class: basic +Section: 4 +C-Name: compraw +Prototype: GG +Help: qfbcompraw(x,y): Gaussian composition without reduction of the binary + quadratic forms x and y + +Function: qfbhclassno +Class: basic +Section: 4 +C-Name: hclassno +Prototype: G +Help: qfbhclassno(x): Hurwitz-Kronecker class number of x>0 + +Function: qfbnucomp +Class: basic +Section: 4 +C-Name: nucomp +Prototype: GGG +Help: qfbnucomp(x,y,l): composite of primitive positive definite quadratic + forms x and y using nucomp and nudupl, where l=[|D/4|^(1/4)] is precomputed + +Function: qfbnupow +Class: basic +Section: 4 +C-Name: nupow +Prototype: GG +Help: qfbnupow(x,n): n-th power of primitive positive definite quadratic + form x using nucomp and nudupl + +Function: qfbpowraw +Class: basic +Section: 4 +C-Name: powraw +Prototype: GL +Help: qfbpowraw(x,n): n-th power without reduction of the binary quadratic + form x + +Function: qfbprimeform +Class: basic +Section: 4 +C-Name: primeform +Prototype: GGp +Help: qfbprimeform(x,p): returns the prime form of discriminant x, whose + first coefficient is p + +Function: qfbred +Class: basic +Section: 4 +C-Name: qfbred0 +Prototype: GD0,L,DGDGDG +Help: qfbred(x,{flag=0},{D},{isqrtD},{sqrtD}): reduction of the binary + quadratic form x. All other args. are optional. D, isqrtD and sqrtD, if + present, supply the values of the discriminant, floor(sqrt(D)) and sqrt(D) + respectively. If D<0, its value is not used and all references to Shanks's + distance hereafter are meaningless. flag can be any of 0: default, uses + Shanks's distance function d; 1: use d, do a single reduction step; 2: do + not use d; 3: do not use d, single reduction step. + +Function: qfgaussred +Class: basic +Section: 8 +C-Name: sqred +Prototype: G +Help: qfgaussred(x): square reduction of the (symmetric) matrix x (returns a + square matrix whose i-th diagonal term is the coefficient of the i-th square + in which the coefficient of the i-th variable is 1) + +Function: qfjacobi +Class: basic +Section: 8 +C-Name: jacobi +Prototype: Gp +Help: qfjacobi(x): eigenvalues and orthogonal matrix of eigenvectors of the + real symmetric matrix x + +Function: qflll +Class: basic +Section: 8 +C-Name: qflll0 +Prototype: GD0,L,p +Help: qflll(x,{flag=0}): LLL reduction of the vectors forming the matrix x + (gives the unimodular transformation matrix). flag is optional, and can be + 0: default, 1: lllint algorithm for integer matrices, 2: lllintpartial + algorithm for integer matrices, 4: lllkerim giving the kernel and the LLL + reduced image, 5: lllkerimgen same but if the matrix has polynomial + coefficients, 8: lllgen, same as qflll when the coefficients are polynomials +Description: + (vec, ?0):vec:prec lll($1, prec) + (vec, 1):vec lllint($1) + (vec, 2):vec lllintpartial($1) + (vec, 3):vec lllrat($1) + (vec, 4):vec lllkerim($1) + (vec, 5):vec lllkerimgen($1) + (vec, 7):vec:prec lll1($1, prec) + (vec, 8):vec lllgen($1) + (vec, 9):vec lllintwithcontent($1) + (vec, #small):vec $"Bad flag in qflll" + (vec, small):vec:prec qflll0($1, $2, prec) + +Function: qflllgram +Class: basic +Section: 8 +C-Name: qflllgram0 +Prototype: GD0,L,p +Help: qflllgram(x,{flag=0}): LLL reduction of the lattice whose gram matrix + is x (gives the unimodular transformation matrix). flag is optional and can + be 0: default,1: lllgramint algorithm for integer matrices, 4: lllgramkerim + giving the kernel and the LLL reduced image, 5: lllgramkerimgen same when + the matrix has polynomial coefficients, 8: lllgramgen, same as qflllgram + when the coefficients are polynomials + +Function: qfminim +Class: basic +Section: 8 +C-Name: qfminim0 +Prototype: GGGD0,L,p +Help: qfminim(x,bound,maxnum,{flag=0}): number of vectors of square norm <= + bound, maximum norm and list of vectors for the integral and definite + quadratic form x; minimal non-zero vectors if bound=0. flag is optional, and + can be 0: default; 1: returns the first minimal vector found (ignore + maxnum); 2: as 0 but use Fincke-Pohst (valid for non integral quadratic + forms) + +Function: qfperfection +Class: basic +Section: 8 +C-Name: perf +Prototype: G +Help: qfperfection(a): rank of matrix of xx~ for x minimal vectors of a gram + matrix a + +Function: qfsign +Class: basic +Section: 8 +C-Name: signat +Prototype: G +Help: qfsign(x): signature of the symmetric matrix x + +Function: quadclassunit +Class: basic +Section: 4 +C-Name: quadclassunit0 +Prototype: GD0,L,DGp +Help: quadclassunit(D,{flag=0},{tech=[]}): compute the structure of the + class group and the regulator of the quadratic field of discriminant D. If + flag is non-null (and D>0), compute the narrow class group. See manual for + the optional technical parameters + +Function: quaddisc +Class: basic +Section: 4 +C-Name: quaddisc +Prototype: G +Help: quaddisc(x): discriminant of the quadratic field Q(sqrt(x)) + +Function: quadgen +Class: basic +Section: 4 +C-Name: quadgen +Prototype: G +Help: quadgen(x): standard generator of quadratic order of discriminant x + +Function: quadhilbert +Class: basic +Section: 4 +C-Name: quadhilbert +Prototype: GDGp +Help: quadhilbert(D,{flag=0}): relative equation for the Hilbert class field + of the quadratic field of discriminant D (which can also be a bnf). If flag + is a non-zero integer and D<0, list of [form,root(form)] (used for + contructing subfields). If D<0, flag can also be a 2-component vector [p,q], + where p,q are the prime numbers needed for Schertz's method. In that case, + return 0 if [p,q] not suitable. If D>0 and flag is non-zero, try hard to + find the best modulus + +Function: quadpoly +Class: basic +Section: 4 +C-Name: quadpoly0 +Prototype: GDn +Help: quadpoly(D,{v=x}): quadratic polynomial corresponding to the + discriminant D, in variable v + +Function: quadray +Class: basic +Section: 4 +C-Name: quadray +Prototype: GGDGp +Help: quadray(D,f,{flag=0}): relative equation for the ray class field of + conductor f for the quadratic field of discriminant D (which can also be a + bnf). For D < 0, flag has the following meaning: if flag is an odd integer, + output instead the vector of [ideal,corresponding root]. It can also be a + two component vector [lambda,flag], where flag is as above and lambda is the + technical element of bnf necessary for Schertz's method. In that case, + return 0 if lambda is not suitable. For D > 0, if flag is non-zero, try hard + to find the best modulus + +Function: quadregulator +Class: basic +Section: 4 +C-Name: gregula +Prototype: Gp +Help: quadregulator(x): regulator of the real quadratic field of + discriminant x +Description: + (int):mp:prec regula($1, prec) + (gen):gen:prec gregula($1, prec) + +Function: quadunit +Class: basic +Section: 4 +C-Name: gfundunit +Prototype: Gp +Help: quadunit(x): fundamental unit of the quadratic field of discriminant x + where x must be positive +Description: + (int):gen fundunit($1) + (gen):gen gfundunit($1) + +Function: quit +Class: gp +Section: 11 +C-Name: gp_quit +Prototype: v +Help: quit(): quits GP and return to the system + +Function: random +Class: basic +Section: 2 +C-Name: genrand +Prototype: DG +Help: random({N=2^31}): random integer between 0 and N-1 +Description: + (?int):int genrand($1) + (real):void $"incorrect type `real' in random" + +Function: read +Class: gp +Section: 11 +C-Name: read0 +Prototype: D\"\",s, +Help: read({filename}): read from the input file filename. If filename is + omitted, reread last input file (be it from readfile or \\r) + +Function: real +Class: basic +Section: 2 +C-Name: greal +Prototype: G +Help: real(x): real part of x + +Function: removeprimes +Class: basic +Section: 4 +C-Name: removeprimes +Prototype: DG +Help: removeprimes({x=[]}): remove primes in the vector x (with at most 100 + components) from the prime table. x can also be a single integer. List the + current extra primes if x is omitted + +Function: reorder +Class: basic +Section: 11 +C-Name: reorder +Prototype: DG +Help: reorder({x=[]}): reorder the variables for output according to the + vector x. If x is void or omitted, print the current list of variables + +Function: return +Class: basic +Section: 11 +C-Name: return0 +Prototype: DG +Help: return({x=0}): return from current subroutine with result x + +Function: rnfalgtobasis +Class: basic +Section: 6 +C-Name: rnfalgtobasis +Prototype: GG +Help: rnfalgtobasis(rnf,x): relative version of nfalgtobasis, where rnf is a + relative numberfield + +Function: rnfbasis +Class: basic +Section: 6 +C-Name: rnfbasis +Prototype: GG +Help: rnfbasis(bnf,order): given an order as output by rnfpseudobasis or + rnfsteinitz, gives either a basis of the order if it is free, or an + n+1-element generating set + +Function: rnfbasistoalg +Class: basic +Section: 6 +C-Name: rnfbasistoalg +Prototype: GG +Help: rnfbasistoalg(rnf,x): relative version of nfbasistoalg, where rnf is a + relative numberfield + +Function: rnfcharpoly +Class: basic +Section: 6 +C-Name: rnfcharpoly +Prototype: GGGDn +Help: rnfcharpoly(nf,T,alpha,{var=x}): characteristic polynomial of alpha + over nf, where alpha belongs to the algebra defined by T over nf. Returns a + polynomial in variable var (x by default) + +Function: rnfconductor +Class: basic +Section: 6 +C-Name: rnfconductor +Prototype: GGD0,L, +Help: rnfconductor(bnf,polrel,{flag=0}): conductor of the Abelian extension + of bnf defined by polrel. The result is [conductor,rayclassgroup,subgroup], + where conductor is the conductor itself, rayclassgroup the structure of the + corresponding full ray class group, and subgroup the HNF defining the norm + group (Artin or Takagi group) on the given generators rayclassgroup[3]. If + flag is non-zero, check (under GRH) that polrel indeed defines an Abelian + extension + +Function: rnfdedekind +Class: basic +Section: 6 +C-Name: rnfdedekind +Prototype: GGG +Help: rnfdedekind(nf,T,pr): relative Dedekind criterion over nf, applied to + the order defined by a root of irreducible polynomial T, modulo the prime + ideal pr. Returns [flag,basis,val], where basis is a pseudo-basis of the + enlarged order, flag is 1 iff this order is pr-maximal, and val is the + valuation in pr of the order discriminant + +Function: rnfdet +Class: basic +Section: 6 +C-Name: rnfdet0 +Prototype: GGDG +Help: rnfdet(nf,order): given a pseudomatrix, compute its pseudodeterminant + +Function: rnfdisc +Class: basic +Section: 6 +C-Name: rnfdiscf +Prototype: GG +Help: rnfdisc(nf,pol): given a pol with coefficients in nf, gives a + 2-component vector [D,d], where D is the relative ideal discriminant, and d + is the relative discriminant in nf^*/nf*^2 + +Function: rnfeltabstorel +Class: basic +Section: 6 +C-Name: rnfelementabstorel +Prototype: GG +Help: rnfeltabstorel(rnf,x): transforms the element x from absolute to + relative representation + +Function: rnfeltdown +Class: basic +Section: 6 +C-Name: rnfelementdown +Prototype: GG +Help: rnfeltdown(rnf,x): expresses x on the base field if possible; returns + an error otherwise + +Function: rnfeltreltoabs +Class: basic +Section: 6 +C-Name: rnfelementreltoabs +Prototype: GG +Help: rnfeltreltoabs(rnf,x): transforms the element x from relative to + absolute representation + +Function: rnfeltup +Class: basic +Section: 6 +C-Name: rnfelementup +Prototype: GG +Help: rnfeltup(rnf,x): expresses x (belonging to the base field) on the + relative field + +Function: rnfequation +Class: basic +Section: 6 +C-Name: rnfequation0 +Prototype: GGD0,L, +Help: rnfequation(nf,pol,{flag=0}): given a pol with coefficients in nf, + gives the absolute equation apol of the number field defined by pol. flag is + optional, and can be 0: default, or non-zero, gives [apol,th], where th + expresses the root of nf.pol in terms of the root of apol + +Function: rnfhnfbasis +Class: basic +Section: 6 +C-Name: rnfhermitebasis +Prototype: GG +Help: rnfhnfbasis(bnf,order): given an order as output by rnfpseudobasis, + gives either a true HNF basis of the order if it exists, zero otherwise + +Function: rnfidealabstorel +Class: basic +Section: 6 +C-Name: rnfidealabstorel +Prototype: GG +Help: rnfidealabstorel(rnf,x): transforms the ideal x from absolute to + relative representation + +Function: rnfidealdown +Class: basic +Section: 6 +C-Name: rnfidealdown +Prototype: GG +Help: rnfidealdown(rnf,x): finds the intersection of the ideal x with the + base field + +Function: rnfidealhnf +Class: basic +Section: 6 +C-Name: rnfidealhermite +Prototype: GG +Help: rnfidealhnf(rnf,x): relative version of idealhnf, where rnf is a + relative numberfield + +Function: rnfidealmul +Class: basic +Section: 6 +C-Name: rnfidealmul +Prototype: GGG +Help: rnfidealmul(rnf,x,y): relative version of idealmul, where rnf is a + relative numberfield + +Function: rnfidealnormabs +Class: basic +Section: 6 +C-Name: rnfidealnormabs +Prototype: GG +Help: rnfidealnormabs(rnf,x): absolute norm of the ideal x + +Function: rnfidealnormrel +Class: basic +Section: 6 +C-Name: rnfidealnormrel +Prototype: GG +Help: rnfidealnormrel(rnf,x): relative norm of the ideal x + +Function: rnfidealreltoabs +Class: basic +Section: 6 +C-Name: rnfidealreltoabs +Prototype: GG +Help: rnfidealreltoabs(rnf,x): transforms the ideal x from relative to + absolute representation + +Function: rnfidealtwoelt +Class: basic +Section: 6 +C-Name: rnfidealtwoelement +Prototype: GG +Help: rnfidealtwoelt(rnf,x): relative version of idealtwoelement, where rnf + is a relative numberfield + +Function: rnfidealup +Class: basic +Section: 6 +C-Name: rnfidealup +Prototype: GG +Help: rnfidealup(rnf,x): lifts the ideal x (of the base field) to the + relative field + +Function: rnfinit +Class: basic +Section: 6 +C-Name: rnfinitalg +Prototype: GGp +Help: rnfinit(nf,pol): pol being a non constant irreducible polynomial + defined over the number field nf, initializes a vector of data necessary for + working in relative number fields (rnf functions). See manual for technical + details + +Function: rnfisfree +Class: basic +Section: 6 +C-Name: rnfisfree +Prototype: lGG +Help: rnfisfree(bnf,order): given an order as output by rnfpseudobasis or + rnfsteinitz, outputs true (1) or false (0) according to whether the order is + free or not + +Function: rnfisnorm +Class: basic +Section: 6 +C-Name: rnfisnorm +Prototype: GGD0,L, +Help: rnfisnorm(T,x,{flag=0}): T is as output by rnfisnorminit applied to + L/K. Tries to tell whether x is a norm from L/K. Returns a vector [a,b] + where x=Norm(a)*b. Looks for a solution which is a S-integer, with S a list + of places in K containing the ramified primes, generators of the class group + of ext, as well as those primes dividing x. If L/K is Galois, omit flag, + otherwise it is used to add more places to S: all the places above the + primes p <= flag (resp. p | flag) if flag > 0 (resp. flag < 0). The answer + is guaranteed (i.e x norm iff b=1) if L/K is Galois or, under GRH, if S + contains all primes less than 12.log(disc(M))^2, where M is the normal + closure of L/K + +Function: rnfisnorminit +Class: basic +Section: 6 +C-Name: rnfisnorminit +Prototype: GGD2,L, +Help: rnfisnorminit(pol,polrel,{flag=2}): let K be defined by a root of pol, + L/K the extension defined by polrel. Compute technical data needed by + rnfisnorm to solve norm equations Nx = a, for x in L, and a in K. If flag=0, + do not care whether L/K is Galois or not; if flag = 1, assume L/K is Galois; + if flag = 2, determine whether L/K is Galois + +Function: rnfkummer +Class: basic +Section: 6 +C-Name: rnfkummer +Prototype: GDGD0,L,p +Help: rnfkummer(bnr,{subgroup},{deg=0}): bnr being as output by bnrinit, + finds a relative equation for the class field corresponding to the module in + bnr and the given congruence subgroup (the ray class field if subgroup is + omitted). deg can be zero (default), or positive, and in this case the + output is the list of all relative equations of degree deg for the given bnr + +Function: rnflllgram +Class: basic +Section: 6 +C-Name: rnflllgram +Prototype: GGGp +Help: rnflllgram(nf,pol,order): given a pol with coefficients in nf and an + order as output by rnfpseudobasis or similar, gives [[neworder],U], where + neworder is a reduced order and U is the unimodular transformation matrix + +Function: rnfnormgroup +Class: basic +Section: 6 +C-Name: rnfnormgroup +Prototype: GG +Help: rnfnormgroup(bnr,polrel): norm group (or Artin or Takagi group) + corresponding to the Abelian extension of bnr.bnf defined by polrel, where + the module corresponding to bnr is assumed to be a multiple of the + conductor. The result is the HNF defining the norm group on the given + generators in bnr[5][3] + +Function: rnfpolred +Class: basic +Section: 6 +C-Name: rnfpolred +Prototype: GGp +Help: rnfpolred(nf,pol): given a pol with coefficients in nf, finds a list + of relative polynomials defining some subfields, hopefully simpler + +Function: rnfpolredabs +Class: basic +Section: 6 +C-Name: rnfpolredabs +Prototype: GGD0,L, +Help: rnfpolredabs(nf,pol,{flag=0}): given a pol with coefficients in nf, + finds a relative simpler polynomial defining the same field. Binary digits + of flag mean: 1: return also the element whose characteristic polynomial is + the given polynomial, 2: return an absolute polynomial, 16: partial + reduction + +Function: rnfpseudobasis +Class: basic +Section: 6 +C-Name: rnfpseudobasis +Prototype: GG +Help: rnfpseudobasis(nf,pol): given a pol with coefficients in nf, gives a + 4-component vector [A,I,D,d] where [A,I] is a pseudo basis of the maximal + order in HNF on the power basis, D is the relative ideal discriminant, and d + is the relative discriminant in nf^*/nf*^2 + +Function: rnfsteinitz +Class: basic +Section: 6 +C-Name: rnfsteinitz +Prototype: GG +Help: rnfsteinitz(nf,order): given an order as output by rnfpseudobasis, + gives [A,I,D,d] where (A,I) is a pseudo basis where all the ideals except + perhaps the last are trivial + +Function: round +Class: basic +Section: 2 +C-Name: round0 +Prototype: GD& +Help: round(x,{&e}): take the nearest integer to all the coefficients of x. + If e is present, do not take into account loss of integer part precision, + and set e = error estimate in bits + +Function: serconvol +Class: basic +Section: 7 +C-Name: convol +Prototype: GG +Help: serconvol(x,y): convolution (or Hadamard product) of two power series + +Function: serlaplace +Class: basic +Section: 7 +C-Name: laplace +Prototype: G +Help: serlaplace(x): replaces the power series sum of a_n*x^n/n! by sum of + a_n*x^n. For the reverse operation, use serconvol(x,exp(X)) + +Function: serreverse +Class: basic +Section: 7 +C-Name: recip +Prototype: G +Help: serreverse(x): reversion of the power series x + +Function: setintersect +Class: basic +Section: 8 +C-Name: setintersect +Prototype: GG +Help: setintersect(x,y): intersection of the sets x and y +Description: + (vec, vec):vec setintersect($1, $2) + +Function: setisset +Class: basic +Section: 8 +C-Name: setisset +Prototype: lG +Help: setisset(x): true(1) if x is a set (row vector with strictly + increasing entries), false(0) if not + +Function: setminus +Class: basic +Section: 8 +C-Name: setminus +Prototype: GG +Help: setminus(x,y): set of elements of x not belonging to y +Description: + (vec, vec):vec setminus($1, $2) + +Function: setrand +Class: basic +Section: 11 +C-Name: setrand +Prototype: lL +Help: setrand(n): reset the seed of the random number generator to n + +Function: setsearch +Class: basic +Section: 8 +C-Name: setsearch +Prototype: lGGD0,L, +Help: setsearch(x,y,{flag=0}): looks if y belongs to the set x. If flag is 0 + or omitted, returns 0 if it is not, otherwise returns the index j such that + y==x[j]. If flag is non-zero, return 0 if y belongs to x, otherwise the + index j where it should be inserted + +Function: setunion +Class: basic +Section: 8 +C-Name: setunion +Prototype: GG +Help: setunion(x,y): union of the sets x and y +Description: + (vec, vec):vec setunion($1, $2) + +Function: shift +Class: basic +Section: 1 +C-Name: gshift3 +Prototype: GLD0,L, +Help: shift(x,n,{flag=0}): shift x left n bits if n>=0, right -n bits if + n<0. If flag is true and n is negative, will treat negative integer x as if + modulo big power of 2, otherwise sign of x is ignored but preserved + +Function: shiftmul +Class: basic +Section: 1 +C-Name: gmul2n +Prototype: GL +Help: shiftmul(x,n): multiply x by 2^n (n>=0 or n<0) + +Function: sigma +Class: basic +Section: 4 +C-Name: gsumdivk +Prototype: GD1,L, +Help: sigma(x,{k=1}): sum of the k-th powers of the divisors of x. k is + optional and if omitted is assumed to be equal to 1 +Description: + (int, ?1):int sumdiv($1) + (int, 0):int numbdiv($1) + (gen, ?1):gen gsumdiv($1) + (gen, 0):gen gnumbdiv($1) + (int, small):int sumdivk($1, $2) + (gen, small):gen gsumdivk($1, $2) + +Function: sign +Class: basic +Section: 1 +C-Name: gsigne +Prototype: lG +Help: sign(x): sign of x, of type integer, real or fraction + +Function: simplify +Class: basic +Section: 2 +C-Name: simplify +Prototype: G +Help: simplify(x): simplify the object x as much as possible + +Function: sin +Class: basic +Section: 3 +C-Name: gsin +Prototype: Gp +Help: sin(x): sine of x + +Function: sinh +Class: basic +Section: 3 +C-Name: gsh +Prototype: Gp +Help: sinh(x): hyperbolic sine of x + +Function: sizebyte +Class: basic +Section: 2 +C-Name: taille2 +Prototype: lG +Help: sizebyte(x): number of bytes occupied by the complete tree of the + object x + +Function: sizedigit +Class: basic +Section: 2 +C-Name: sizedigit +Prototype: lG +Help: sizedigit(x): maximum number of decimal digits minus one of (the + coefficients of) x + +Function: solve +Class: basic +Section: 9 +C-Name: zbrent +Prototype: V=GGEp +Help: solve(X=a,b,expr): real root of expression expr (X between a and b), + where expr(a)*expr(b)<=0 + +Function: sqr +Class: basic +Section: 3 +C-Name: gsqr +Prototype: G +Help: sqr(x): square of x. NOT identical to x*x +Description: + (int):int sqri($1) + (mp):mp gsqr($1) + (gen):gen gsqr($1) + +Function: sqrt +Class: basic +Section: 3 +C-Name: gsqrt +Prototype: Gp +Help: sqrt(x): square root of x + +Function: sqrtint +Class: basic +Section: 4 +C-Name: racine +Prototype: G +Help: sqrtint(x): integer square root of x (x integer) + +Function: sqrtn +Class: basic +Section: 3 +C-Name: gsqrtn +Prototype: GGD&p +Help: sqrtn(x,n,{&z}): nth-root of x, n must be integer. If present, z is + set to a suitable root of unity to recover all solutions. If it was not + possible, z is set to zero + +Function: subgrouplist +Class: basic +Section: 6 +C-Name: subgrouplist0 +Prototype: GDGD0,L,p +Help: subgrouplist(bnr,{bound},{flag=0}): bnr being as output by bnrinit or + a list of cyclic components of a finite Abelian group G, outputs the list of + subgroups of G (of index bounded by bound, if not omitted), given as HNF + left divisors of the SNF matrix corresponding to G. If flag=0 (default) and + bnr is as output by bnrinit, gives only the subgroups for which the modulus + is the conductor + +Function: subst +Class: basic +Section: 7 +C-Name: gsubst0 +Prototype: GGG +Help: subst(x,y,z): in expression x, replace the variable y by the + expression z + +Function: sum +Class: basic +Section: 9 +C-Name: somme +Prototype: V=GGEDG +Help: sum(X=a,b,expr,{x=0}): x plus the sum (X goes from a to b) of + expression expr + +Function: sumalt +Class: basic +Section: 9 +C-Name: sumalt0 +Prototype: V=GED0,L,p +Help: sumalt(X=a,expr,{flag=0}): Cohen-Villegas-Zagier's acceleration of + alternating series expr, X starting at a. flag is optional, and can be 0: + default, or 1: uses a slightly different method using Zagier's polynomials + +Function: sumdiv +Class: basic +Section: 9 +C-Name: divsum +Prototype: GVE +Help: sumdiv(n,X,expr): sum of expression expr, X running over the divisors + of n + +Function: suminf +Class: basic +Section: 9 +C-Name: suminf +Prototype: V=GEp +Help: suminf(X=a,expr): infinite sum (X goes from a to infinity) of real or + complex expression expr + +Function: sumpos +Class: basic +Section: 9 +C-Name: sumpos0 +Prototype: V=GED0,L,p +Help: sumpos(X=a,expr,{flag=0}): sum of positive series expr, the formal + variable X starting at a. flag is optional, and can be 0: default, or 1: + uses a slightly different method using Zagier's polynomials + +Function: system +Class: gp +Section: 11 +C-Name: system0 +Prototype: vs +Help: system(a): a being a string, execute the system command a (not valid + on every machine) + +Function: tan +Class: basic +Section: 3 +C-Name: gtan +Prototype: Gp +Help: tan(x): tangent of x + +Function: tanh +Class: basic +Section: 3 +C-Name: gth +Prototype: Gp +Help: tanh(x): hyperbolic tangent of x + +Function: taylor +Class: basic +Section: 7 +C-Name: tayl +Prototype: GnP +Help: taylor(x,y): taylor expansion of x with respect to the main variable + of y + +Function: teichmuller +Class: basic +Section: 3 +C-Name: teich +Prototype: G +Help: teichmuller(x): teichmuller character of p-adic number x + +Function: theta +Class: basic +Section: 3 +C-Name: theta +Prototype: GGp +Help: theta(q,z): Jacobi sine theta-function + +Function: thetanullk +Class: basic +Section: 3 +C-Name: thetanullk +Prototype: GLp +Help: thetanullk(q,k): k'th derivative at z=0 of theta(q,z) + +Function: thue +Class: basic +Section: 7 +C-Name: thue +Prototype: GGDG +Help: thue(tnf,a,{sol}): solve the equation P(x,y)=a, where tnf was created + with thueinit(P), and sol, if present, contains the solutions of Norm(x)=a + modulo units in the number field defined by P. If tnf was computed without + assuming GRH (flag 1 in thueinit), the result is unconditional + +Function: thueinit +Class: basic +Section: 7 +C-Name: thueinit +Prototype: GD0,L,p +Help: thueinit(P,{flag=0}): initialize the tnf corresponding to P, that will + be used to solve Thue equations P(x,y) = some-integer. If flag is non-zero, + certify the result unconditionnaly. Otherwise, assume GRH (much faster of + course) + +Function: trace +Class: basic +Section: 8 +C-Name: gtrace +Prototype: G +Help: trace(x): trace of x + +Function: trap +Class: gp +Section: 11 +C-Name: trap0 +Prototype: D\"\",r,DIDI +Help: trap({err}, {rec}, {seq}): try to execute seq, trapping error err (all + of them if err ommitted); sequence rec is executed if the error occurs and + is the result of the command. When seq is omitted, define rec as a default + handler for error err (a break loop will be started if rec omitted). If rec + is the empty string \"\" pop out the last default handler + +Function: truncate +Class: basic +Section: 2 +C-Name: trunc0 +Prototype: GD& +Help: truncate(x,{&e}): truncation of x; when x is a power series,take away + the O(X^). If e is present, do not take into account loss of integer part + precision, and set e = error estimate in bits +Description: + (small):small:parens $1 + (mp):int gtrunc($1) + (mp, &small):int gcvtoi($1, &$2) + (mp, &int):int trunc0($1, &$2) + (gen):gen gtrunc($1) + (gen, &small):gen gcvtoi($1, &$2) + (gen, &int):gen trunc0($1, &$2) + +Function: type +Class: highlevel +Section: 11 +C-Name: type0 +Prototype: GD\"\",r, +Help: type(x,{t}): if t is not present, output the type of the GEN x. Else + make a copy of x with type t. Use with extreme care, usually with t = + t_FRACN or t = t_RFRACN). Try \\t for a list of types + +Function: until +Class: basic +Section: 11 +Help: until(a,seq): evaluate the expression sequence seq until a is nonzero + +Function: valuation +Class: basic +Section: 2 +C-Name: ggval +Prototype: lGG +Help: valuation(x,p): valuation of x with respect to p + +Function: variable +Class: basic +Section: 2 +C-Name: gpolvar +Prototype: G +Help: variable(x): main variable of object x. Gives p for p-adic x, error + for scalars +Description: + (pol):var:parens:copy $var:1 + (gen):gen gpolvar($1) + +Function: vecextract +Class: basic +Section: 8 +C-Name: extract0 +Prototype: GGDG +Help: vecextract(x,y,{z}): extraction of the components of the matrix or + vector x according to y and z. If z is omitted, y designs columns, otherwise + y corresponds to rows and z to columns. y and z can be vectors (of indices), + strings (indicating ranges as in \"1..10\") or masks (integers whose binary + representation indicates the indices to extract, from left to right 1, 2, 4, + 8, etc.) + +Function: vecmax +Class: basic +Section: 1 +C-Name: vecmax +Prototype: G +Help: vecmax(x): maximum of the elements of the vector/matrix x + +Function: vecmin +Class: basic +Section: 1 +C-Name: vecmin +Prototype: G +Help: vecmin(x): minimum of the elements of the vector/matrix x + +Function: vecsort +Class: basic +Section: 8 +C-Name: vecsort0 +Prototype: GDGD0,L, +Help: vecsort(x,{k},{flag=0}): sorts the vector of vectors (or matrix) x in + ascending order, according to the value of its k-th component if k is not + omitted. Binary digits of flag (if present) mean: 1: indirect sorting, + return the permutation instead of the permuted vector, 2: sort using + lexicographic order, 4: use descending instead of ascending order +Description: + (vec):vec sort($1) + (vec, gen):vec vecsort0($1, $2, 0) + (vec, , 0):vec sort($1) + (vec, , 1):vec indexsort($1) + (vec, , 2):vec lexsort($1) + (vec, , small):vec vecsort0($1, NULL, $3) + (vec, gen, small):vec vecsort0($1, $2, $3) + +Function: vector +Class: basic +Section: 8 +C-Name: vecteur +Prototype: GDVDI +Help: vector(n,{X},{expr=0}): row vector with n components of expression + expr (X ranges from 1 to n). By default, fill with 0s + +Function: vectorsmall +Class: basic +Section: 8 +C-Name: vecteursmall +Prototype: GDVDI +Help: vectorsmall(n,{X},{expr=0}): VECSMALL with n components of expression + expr (X ranges from 1 to n) which must be small integers. By default, fill + with 0s + +Function: vectorv +Class: basic +Section: 8 +C-Name: vvecteur +Prototype: GDVDI +Help: vectorv(n,{X},{expr=0}): column vector with n components of expression + expr (X ranges from 1 to n). By default, fill with 0s + +Function: weber +Class: basic +Section: 3 +C-Name: weber0 +Prototype: GD0,L,p +Help: weber(x,{flag=0}): One of Weber's f function of x. flag is optional, + and can be 0: default, function f(x)=exp(-i*Pi/24)*eta((x+1)/2)/eta(x) such + that (j=(f^24-16)^3/f^24), 1: function f1(x)=eta(x/2)/eta(x) such that + (j=(f1^24+16)^3/f2^24), 2: function f2(x)=sqrt(2)*eta(2*x)/eta(x) such that + (j=(f2^24+16)^3/f2^24) + +Function: whatnow +Class: gp +Section: 11 +C-Name: whatnow0 +Prototype: vr +Help: whatnow(fun): if f was present in GP version 1.39.15 or lower, gives + the new function name + +Function: while +Class: basic +Section: 11 +Help: while(a,seq): while a is nonzero evaluate the expression sequence seq. + Otherwise 0 + +Function: write +Class: gp +Section: 11 +C-Name: write0 +Prototype: vss* +Help: write(filename,a): write the string expression a (same output as + print) to filename + +Function: write1 +Class: gp +Section: 11 +C-Name: write1 +Prototype: vss* +Help: write1(filename,a): write the string expression a (same output as + print1) to filename + +Function: writebin +Class: gp +Section: 11 +C-Name: gpwritebin +Prototype: vsDG +Help: writebin(filename,{x}): write x as a binary object to file filename. + If x is omitted, write all session variables + +Function: writetex +Class: gp +Section: 11 +C-Name: writetex +Prototype: vss* +Help: writetex(filename,a): write the string expression a (same format as + print) to filename, in TeX format + +Function: zeta +Class: basic +Section: 3 +C-Name: gzeta +Prototype: Gp +Help: zeta(s): Riemann zeta function at s + +Function: zetak +Class: basic +Section: 6 +C-Name: gzetakall +Prototype: GGD0,L,p +Help: zetak(nfz,s,{flag=0}): Dedekind zeta function of the number field nfz + at s, where nfz is the vector computed by zetakinit (NOT by nfinit) flag is + optional, and can be 0: default, compute zetak, or non-zero: compute the + lambdak function, i.e. with the gamma factors + +Function: zetakinit +Class: basic +Section: 6 +C-Name: initzeta +Prototype: Gp +Help: zetakinit(x): compute number field information necessary to use zetak, + where x is an irreducible polynomial + +Function: znlog +Class: basic +Section: 4 +C-Name: znlog +Prototype: GG +Help: znlog(x,g): g as output by znprimroot (modulo a prime). Return + smallest positive n such that g^n = x + +Function: znorder +Class: basic +Section: 4 +C-Name: order +Prototype: G +Help: znorder(x): order of the integermod x in (Z/nZ)* + +Function: znprimroot +Class: basic +Section: 4 +C-Name: ggener +Prototype: G +Help: znprimroot(n): returns a primitive root of n when it exists +Description: + (int):gen gener($1) + (gen):gen ggener($1) + +Function: znstar +Class: basic +Section: 4 +C-Name: znstar +Prototype: G +Help: znstar(n): 3-component vector v, giving the structure of (Z/nZ)^*. + v[1] is the order (i.e. eulerphi(n)), v[2] is a vector of cyclic components, + and v[3] is a vector giving the corresponding generators + --- /dev/null Sat Mar 1 19:52:54 2003 +++ src/desc/Makefile Tue Jun 17 12:47:11 2003 @@ -0,0 +1,14 @@ +PERL=perl +all: ../language/init.h ../gp/gp_init.h ../gp/highlvl.h + +../language/init.h: Def + $(PERL) 822proto basic Def > ../language/init.h + $(PERL) 822help basic Def >> ../language/init.h + +../gp/gp_init.h: Def + $(PERL) 822proto gp Def > ../gp/gp_init.h + $(PERL) 822help gp Def >> ../gp/gp_init.h + +../gp/highlvl.h: Def + $(PERL) 822proto highlevel Def > ../gp/highlvl.h + $(PERL) 822help highlevel Def >> ../gp/highlvl.h --- /dev/null Sat Mar 1 19:52:54 2003 +++ src/desc/PARI/822.pm Sun Mar 10 22:33:23 2002 @@ -0,0 +1,123 @@ +#!/usr/bin/perl -w +package PARI::822; +use strict; + +sub new { bless {} } + +=d1 NAME + +PARI::822::read -- Read Description files. + +=head1 SYNOPSIS + +$database->PARI::822::new(); +$database->read($filename,$mode) + +PARI::822::read(\%database,$filename,$mode) + +=head1 DESCRIPTION + +read the database file $filename and merge the information in the database. + +Mode is a bitmap flag +mode&1: new values cannot overwrite old ones. +mode&2: new functions are not allowed. + +=cut + +sub read +{ + + local $/="\n"; + local *FILE; + + my ($ret,$file,$check)=@_; + $check=0 if (!defined($check)); + my $invars=0; + my ($key, $value); + my $line; + my $entry; + + open FILE,"<$file"; + while ($line = <FILE>) + { + chomp $line; + if ($invars) + { + if ($line =~ /^\s/) + { + $line =~ s/^\s+//; + $value.="\n$line"; + next; + } + else + { + $invars=0; + $value =~ s/\s*$//; + if (!defined($ret->{$entry}->{$key})) + { + $ret->{$entry}->{$key}=$value; + } + elsif (($check&1) and $ret->{$entry}->{$key} ne $value) + { + die ("Unmatched data: $entry: $key: $ret->{$entry}->{$key} ne $value"); + } + } + } + next if ($line eq ''); + ($key, $value)=split(/:\s*/, $line, 2); + die("Bad entry $key") if (!defined($value)); + if ($key eq 'Function') + { + $entry=$value; + } + die("New function $value") if (($check&2) and !defined($ret->{$entry})); + $invars=1; + } + return 0; +} + +=d1 NAME + +PARI::822::write -- Write Description files. + +=head1 SYNOPSIS + +$database->PARI::822::new(); +$database->write() + +PARI::822::write(\%database) + + +=head1 DESCRIPTION + +output a database to STDOUT in canonical 822 format. + +=cut + + +sub write +{ + my @order=("Function","Class","Section","C-Name","Prototype","Type","Help","Description"); + my %knowfields=map {$_ => 1} @order; + my %data=%{shift()}; + foreach my $func (sort keys %data) + { + foreach my $field (@order) + { + my $val=$data{$func}->{$field}; + next if (!defined($val)); + $val =~ s/\n/\n /g; + print $field.": $val\n"; + } + foreach my $field (sort keys %{$data{$func}}) + { + next if ($knowfields{$field}); + my $val=$data{$func}->{$field}; + $val =~ s/\n/\n /g; + print $field.": $val\n"; + } + print "\n"; + } +} +1;