Home | Trees | Index | Help |
|
---|
Package sage :: Package pari :: Module py_pari :: Class gen |
|
object
--+
|
gen
Method Summary | |
---|---|
x.__abs__() <==> abs(x) | |
x.__add__(y) <==> x+y | |
__bool__(...)
| |
x.__call__(...) <==> x(...) | |
x.__cmp__(y) <==> cmp(x,y) | |
x.__delitem__(y) <==> del x[y] | |
x.__div__(y) <==> x/y | |
x.__eq__(y) <==> x==y | |
x.__float__() <==> float(x) | |
x.__ge__(y) <==> x>=y | |
x.__getitem__(y) <==> x[y] | |
Use of negative indices is not supported. | |
x.__gt__(y) <==> x>y | |
x.__int__() <==> int(x) | |
x.__invert__() <==> ~x | |
x.__le__(y) <==> x<=y | |
x.__len__() <==> len(x) | |
x.__long__() <==> long(x) | |
x.__lshift__(y) <==> x<<y | |
x.__lt__(y) <==> x<y | |
x.__mod__(y) <==> x%y | |
x.__mul__(y) <==> x*y | |
x.__ne__(y) <==> x!=y | |
x.__neg__() <==> -x | |
T.__new__(S, ...) -> a new object with type S, a subtype of T | |
x.__pow__(y[, z]) <==> pow(x, y[, z]) | |
x.__radd__(y) <==> y+x | |
x.__rdiv__(y) <==> y/x | |
__reduce__(...)
| |
x.__repr__() <==> repr(x) | |
x.__rlshift__(y) <==> y<<x | |
x.__rmod__(y) <==> y%x | |
x.__rmul__(y) <==> y*x | |
y.__rpow__(x[, z]) <==> pow(x, y[, z]) | |
x.__rrshift__(y) <==> y>>x | |
x.__rshift__(y) <==> x>>y | |
x.__rsub__(y) <==> y-x | |
x.__rxor__(y) <==> y^x | |
x.__setitem__(i, y) <==> x[i]=y | |
x.__sub__(y) <==> x-y | |
x.__xor__(y) <==> x^y | |
abs(...)
| |
bezout(...)
| |
binary(...)
| |
bitand(...)
| |
bitneg(...)
| |
bitnegimply(...)
| |
bitor(...)
| |
bittest(...)
| |
bitxor(...)
| |
bnfinit(...)
| |
bnfunit(...)
| |
ceil(...)
| |
centerlift(...)
| |
changevar(...)
| |
charpoly(A,{v=x},{flag=0}): det(v*Id-A) = characteristic polynomial of the matrix A using the comatrix. | |
Col(x): Transforms the object x into a column vector. | |
component(...)
| |
conj(...)
| |
conjvec(...)
| |
copy(...)
| |
denominator(...)
| |
e.disc(): return the discriminant of the elliptic curve e. | |
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}) | |
e.elladd(z1, z2) Sum of the points z1 and z2 on the elliptic curve e. | |
e.ellak(n): Returns the coefficient a_n of the L-function of the elliptic curve e, i.e. | |
EXAMPLES: | |
e.ellak(p): Returns the prime-indexed coefficient a_p of the L-function of the elliptic curve e, i.e. | |
EXAMPLES: | |
EXAMPLES: | |
x.ellchangepoint(y): change data on point or vector of points x... | |
om.elleisnum(k, {flag=0}, {prec}): 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. | |
elleta(...)
| |
ellglobalred(...)
| |
ellheight(...)
| |
Returns 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]. | |
ellisoncurve(...)
| |
ellj(...)
| |
elllocalred(...)
| |
elllseries(...)
| |
ellminimalmodel(e): return the standard minimal integral model of the rational elliptic curve e and the corresponding change of variables. | |
ellorder(...)
| |
ellordinate(...)
| |
ellpointtoz(...)
| |
ellpow(...)
| |
ellrootno(...)
| |
ellsigma(...)
| |
ellsub(...)
| |
elltaniyama(...)
| |
elltors(...)
| |
ellwp(E, z,{flag=0}): Return the complex value of the Weierstrass P-function at z on the lattice defined by e. | |
ellzeta(...)
| |
ellztopoint(...)
| |
exp(...)
| |
factor(x,{lim}): factorization of x. | |
floor(...)
| |
frac(...)
| |
gamma(x): Gamma function at s. | |
gcd(...)
| |
idealfactor(...)
| |
imag(...)
| |
isprime(x, flag=0): Returns True if x is a PROVEN prime number, and False otherwise. | |
issquare(...)
| |
issquarefree(...)
| |
e.j(): return the j-invariant of the elliptic curve e. | |
kronecker(...)
| |
lcm(...)
| |
length(...)
| |
lex(x,y): Compare x and y lexicographically (1 if x>y, 0 if... | |
EXAMPLES: | |
List(x): transforms the PARI vector or list x into a list. | |
Return str that might correctly evaluate to a Python-list. | |
log(...)
| |
Mat(x): transforms any PARI x into a matrix. | |
matker(...)
| |
matkerint(...)
| |
mattranspose(...)
| |
max(x,y): Return the maximum of x and y. | |
min(x,y): Return the minumum of x and y. | |
Mod(x, y): creates the object x modulo y. | |
ncols(...)
| |
nextprime(x): smallest pseudoprime >= x | |
nfbasis(...)
| |
nfinit(...)
| |
norm(...)
| |
nrows(...)
| |
numerator(...)
| |
numtoperm(...)
| |
e.omega(): return basis for the period lattice of the elliptic curve e. | |
order(...)
| |
padicprec(...)
| |
permtonum(...)
| |
Pol(x): convert x (usually a vector or a power series) into a... | |
EXAMPLES: | |
polcompositum(...)
| |
poldisc(...)
| |
polgalois(x): Galois group of the polynomial x | |
polisirreducible(x): Returns True if x is an irreducible non-constant polynomial, or False if x is reducible or constant. | |
polresultant(...)
| |
Polrev(x): convert x (usually a vector or a power series) into a... | |
polroots(x,{flag=0}): complex roots of the polynomial x. | |
precision(...)
| |
Return Python eval of self. | |
Return a Python list of the PARI gens. | |
Qfb(a,b,c,{D=0.}): binary quadratic form a*x^2+b*x*y+c*y^2. | |
random(...)
| |
real(...)
| |
round(...)
| |
Ser(...)
| |
Set(...)
| |
shift(x,n): shift x left n bits if n>=0, right -n bits if n<0. | |
shiftmul(x,n): Return the product of x by 2^n (n>=0 or n<0). | |
sign(x): Return the sign of x, where x is of type integer, real or fraction. | |
simplify(...)
| |
sizebyte(...)
| |
sizedigit(...)
| |
sqrt(...)
| |
Str(...)
| |
Strchr(...)
| |
Strexpand(...)
| |
Strtex(...)
| |
EXAMPLES: | |
trace(...)
| |
truncate(...)
| |
type(...)
| |
valuation(...)
| |
variable(...)
| |
Vec(...)
| |
vecmax(x): Return the maximum of the elements of the vector/matrix x, | |
vecmin(x): Return the maximum of the elements of the vector/matrix x, | |
Vecsmall(...)
| |
xgcd(...)
| |
zeta(s): Riemann zeta function at s with s a complex or a p-adic number. | |
znprimroot(...)
| |
Inherited from object | |
x.__init__(...) initializes x; see x.__class__.__doc__ for signature | |
x.__delattr__('name') <==> del x.name | |
x.__getattribute__('name') <==> x.name | |
x.__hash__() <==> hash(x) | |
helper for pickle | |
x.__setattr__('name', value) <==> x.name = value | |
x.__str__() <==> str(x) |
Class Variable Summary | |
---|---|
PyCObject |
__pyx_vtable__ = <PyCObject object at 0xb7d5cf68>
|
Method Details |
---|
__abs__(x)x.__abs__() <==> abs(x)
|
__add__(x,
y)
x.__add__(y) <==> x+y
|
__call__(x,
...)
x.__call__(...) <==> x(...)
|
__cmp__(x,
y)
x.__cmp__(y) <==> cmp(x,y)
|
__delitem__(x,
y)
x.__delitem__(y) <==> del x[y]
|
__div__(x, y)x.__div__(y) <==> x/y
|
__eq__(x,
y)
x.__eq__(y) <==> x==y
|
__float__(x)x.__float__() <==> float(x)
|
__ge__(x,
y)
x.__ge__(y) <==> x>=y
|
__getitem__(x,
y)
x.__getitem__(y) <==> x[y]
|
__getslice__(x,
i,
j)
Use of negative indices is not supported.
|
__gt__(x,
y)
x.__gt__(y) <==> x>y
|
__int__(x)x.__int__() <==> int(x)
|
__invert__(x)x.__invert__() <==> ~x
|
__le__(x,
y)
x.__le__(y) <==> x<=y
|
__len__(x)
x.__len__() <==> len(x)
|
__long__(x)x.__long__() <==> long(x)
|
__lshift__(x, y)x.__lshift__(y) <==> x<<y
|
__lt__(x,
y)
x.__lt__(y) <==> x<y
|
__mod__(x, y)x.__mod__(y) <==> x%y
|
__mul__(x, y)x.__mul__(y) <==> x*y
|
__ne__(x, y)x.__ne__(y) <==> x!=y
|
__neg__(x)x.__neg__() <==> -x
|
__new__(T, S, ...)T.__new__(S, ...) -> a new object with type S, a subtype of T
|
__pow__(x, y, z=...)x.__pow__(y[, z]) <==> pow(x, y[, z])
|
__radd__(x,
y)
x.__radd__(y) <==> y+x
|
__rdiv__(x, y)x.__rdiv__(y) <==> y/x
|
__repr__(x)
x.__repr__() <==> repr(x)
|
__rlshift__(x, y)x.__rlshift__(y) <==> y<<x
|
__rmod__(x, y)x.__rmod__(y) <==> y%x
|
__rmul__(x, y)x.__rmul__(y) <==> y*x
|
__rpow__(y, x, z=...)y.__rpow__(x[, z]) <==> pow(x, y[, z])
|
__rrshift__(x, y)x.__rrshift__(y) <==> y>>x
|
__rshift__(x, y)x.__rshift__(y) <==> x>>y
|
__rsub__(x, y)x.__rsub__(y) <==> y-x
|
__rxor__(x, y)x.__rxor__(y) <==> y^x
|
__setitem__(x,
i,
y)
x.__setitem__(i, y) <==> x[i]=y
|
__sub__(x,
y)
x.__sub__(y) <==> x-y
|
__xor__(x, y)x.__xor__(y) <==> x^y
|
charpoly(...)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. |
Col(...)Col(x): Transforms the object x into a column vector. |
disc(...)e.disc(): return the discriminant of the elliptic curve e. EXAMPLES:>>> e = pari([0, -1, 1, -10, -20]).ellinit() >>> e.disc() -161051 >>> _.factor() [-1, 1; 11, 5] |
divrem(...)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(...)eint1(x,{n}) Returns the exponential integral E1(x). If the optional argument n is given, computes the vector of the first n values of the exponential integral E1(x*n), for x > 0. REFERENCE: See page 262, Prop 5.6.12, of Cohen's book "A Course in Computational Algebraic Number Theory". |
elladd(...)e.elladd(z1, z2) Sum of the points z1 and z2 on the elliptic curve e. INPUT: e -- elliptic curve E z1 -- point on E z2 -- point on E OUTPUT: point on E EXAMPLES: First we create an elliptic curve: >>> e = pari([0, 1, 1, -2, 0]).ellinit() >>> str(e)[:65] # first part of output '[0, 1, 1, -2, 0, 4, -4, 1, -3, 112, -856, 389, 1404928/389, [0.90' Next we add two points on the elliptic curve. Notice that the Python lists are automatically converted to PARI objects so you don't have to do that explicitly in your code. >>> e.elladd([1,0,1], [-1,1,1]) [-3/4, -15/8] |
ellak(...)e.ellak(n): Returns the coefficient a_n of the L-function of the elliptic curve e, i.e. the coefficient of a newform of weight 2 newform. The curve e must be a medium or long vector of the type given by ellinit. For this function to work for every n and not just those prime to the conductor, e must be a minimal Weierstrass equation. If this is not the case, use the function ellminimalmodel first before using ellak (or you will get INCORRECT RESULTS!) INPUT: e -- a PARI elliptic curve. n -- integer .. EXAMPLES: >>> e = pari([0, -1, 1, -10, -20]).ellinit() >>> e.ellak(6) 2 >>> e.ellak(2005) 2 >>> e.ellak(-1) 0 >>> e.ellak(0) 0 |
ellan(...)EXAMPLES:>>> e = pari([0, -1, 1, -10, -20]).ellinit() >>> e.ellan(3) [1, -2, -1] >>> e.ellan(20) [1, -2, -1, 2, 1, 2, -2, 0, -2, -2, 1, -2, 4, 4, -1, -4, -2, 4, 0, 2] >>> e.ellan(-1) [] |
ellap(...)e.ellak(p): Returns the prime-indexed coefficient a_p of the L-function of the elliptic curve e, i.e. the coefficient of a newform of weight 2 newform. If p is not prime, this function will return an INCORRECT answer. The curve e must be a medium or long vector of the type given by ellinit. For this function to work for every n and not just those prime to the conductor, e must be a minimal Weierstrass equation. If this is not the case, use the function ellminimalmodel first before using ellak (or you will get INCORRECT RESULTS!) INPUT: e -- a PARI elliptic curve. p -- prime integer .. EXAMPLES: >>> e = pari([0, -1, 1, -10, -20]).ellinit() >>> e.ellap(2) -2 >>> e.ellap(2003) 4 >>> e.ellak(-1) 0 |
ellbil(...)EXAMPLES:>>> e = pari([0,1,1,-2,0]).ellinit() >>> e.ellbil([1, 0, 1], [-1, 1, 1]) 0.41818898449886058562988945847 >>> get_real_precision() 5Increasing the precision does not increase the result, since quantities related to the elliptic curve were computed to low precision. >>> set_real_precision(10) >>> e.ellbil([1, 0, 1], [-1, 1, 1]) 0.41818898449886058562988945847However, if we recompute the elliptic curve after increasing the precision, then the bilinear pairing will be computed to higher precision as well. >>> e = pari([0,1,1,-2,0]).ellinit() >>> e.ellbil([1, 0, 1], [-1, 1, 1]) 0.41818898449886058562988945821587638237833645961491348466736402242784203834394 >>> set_real_precision(5) |
ellchangecurve(...)EXAMPLES:>>> e = pari([1,2,3,4,5]).ellinit() >>> e.ellglobalred() [10351, [1, -1, 0, -1], 1] >>> f = e.ellchangecurve([1,-1,0,-1]) >>> f[:5] [1, -1, 0, 4, 3] |
ellchangepoint(...)x.ellchangepoint(y): change data on point or vector of points x on an elliptic curve according to y=[u,r,s,t] EXAMPLES: >>> e = pari([0,1,1,-2,0]).ellinit() >>> x = pari([1,0,1]) >>> e.ellisoncurve([1,4,4]) False >>> e.ellisoncurve(x) True >>> f = e.ellchangecurve([1,2,3,-1]) >>> f[:5] # show only first five entries [6, -2, -1, 17, 8] >>> x.ellchangepoint([1,2,3,-1]) [-1, 4] >>> f.ellisoncurve([-1,4]) True |
elleisnum(...)om.elleisnum(k, {flag=0}, {prec}): 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. INPUT: om -- gen, 2-component vector giving a basis of a lattice L k -- int (even positive) flag -- int (default 0) pref -- precision OUTPUT: gen -- numerical value of E_k EXAMPLES: >>> e = pari([0,1,1,-2,0]).ellinit() >>> om = e.omega() >>> om [2.4902125608550550753213577919, 1.9717377015516482044224076983*I] >>> om.elleisnum(2) -5.2886493396542576217915346957 + 0.E-27*I >>> om.elleisnum(4) 111.999999999999999999999999974 >>> om.elleisnum(100) 2.1531424857607763611270703364 E50 >>> om.elleisnum(5) Traceback (most recent call last): ... ArithmeticError: k(=5) must be even >>> om.elleisnum(0) Traceback (most recent call last): ... ArithmeticError: k(=0) must be positive |
ellheightmatrix(e, x)Returns the height matrix for vector of points x on elliptic curve e using theta functions. |
ellinit(...)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. |
ellminimalmodel(...)ellminimalmodel(e): return the standard minimal integral model of the rational elliptic curve e and the corresponding change of variables. INPUT: e -- gen (that defines an elliptic curve) OUTPUT: gen -- minimal model gen -- change of coordinates EXAMPLES: >>> e = pari([1,2,3,4,5]).ellinit() >>> F, ch = e.ellminimalmodel() >>> F[:5] [1, -1, 0, 4, 3] >>> ch [1, -1, 0, -1] >>> e.ellchangecurve(ch)[:5] [1, -1, 0, 4, 3] |
ellwp(...)ellwp(E, z,{flag=0}): Return the complex value of the Weierstrass P-function at z on the lattice defined by e. INPUT: E -- list OR elliptic curve list -- [om1, om2], which are Z-generators for a lattice elliptic curve -- created using ellinit z -- (optional) complex number OR string (default = "z") complex number -- any number in the complex plane string (or PARI variable) -- name of a variable. n -- int (optional: default 20) if z is a variable, compute up to at least o(z^n). flag -- int: 0 (default): compute only P(z) 1 compute [P(z),P'(z)] 2 consider om or E as an elliptic curve and use P-function to compute the point on E (with the Weierstrass equation for E) P(z) for that curve (identical to ellztopoint in this case). OUTPUT: gen -- complex number or list of two complex numbers EXAMPLES: We first define the elliptic curve X_0(11): >>> E = pari([0,-1,1,-10,-20]).ellinit() Compute P(1). >>> E.ellwp(1) 13.965869525748497794694977696 + 2.666694917 E-28*I Compute P(1+I), where I = sqrt(-1). >>> E.ellwp(pari("1+I")) -1.1151068256555508792090664905 + 2.3341905230746988361847987949*I >>> E.ellwp("1+I") -1.1151068256555508792090664905 + 2.3341905230746988361847987949*I The series expansion, to the default 20 precision: >>> E.ellwp() z^-2 + 31/15*z^2 + 2501/756*z^4 + 961/675*z^6 + 77531/41580*z^8 + 1202285717/928746000*z^10 + 2403461/2806650*z^12 + 30211462703/43418875500*z^14 + 3539374016033/7723451736000*z^16 + 413306031683977/1289540602350000*z^18 + O(z^20) Compute the series for wp to lower precision: >>> E.ellwp(n=4) z^-2 + 31/15*z^2 + O(z^4) Next we use the version where the input is generators for a lattice: >>> pari([1.2692, '0.63 + 1.45*I']).ellwp(1) 13.965614693668943648020037360 + 0.00064482927281053614745416306930*I With flag 1 compute the pair P(z) and P'(z): >>> E.ellwp(1, flag=1) [13.965869525748497794694977696 + 2.666694917 E-28*I, 50.561930088007275255584656904 + 0.E-27*I] With flag=2, the computed pair is (x,y) on the curve instead of [P(z),P'(z)]: >>> E.ellwp(1, flag=2) [14.299202859081831128028311029 + 2.666694917 E-28*I, 50.061930088007275255584656904 + 0.E-27*I] |
factor(...)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) |
gamma(...)gamma(x): Gamma function at s. INPUT: s -- gen (real or complex number OUTPUT: gen -- value of zeta at s. EXAMPLES: |
isprime(...)isprime(x, flag=0): Returns True if x is a PROVEN prime number, and False otherwise. INPUT: flag -- int 0 (default): use a combination of algorithms. 1: certify primality using the Pocklington-Lehmer Test. 2: certify primality using the APRCL test. OUTPUT: bool -- True or False EXAMPLES: >>> pari(9).isprime() False >>> pari(17).isprime() True >>> n = pari(561) # smallest Carmichael number >>> n.isprime() # not just a pseudo-primality test! False >>> n.isprime(1) False >>> n.isprime(2) False |
j(...)e.j(): return the j-invariant of the elliptic curve e. EXAMPLES:>>> e = pari([0, -1, 1, -10, -20]).ellinit() >>> e.j() -122023936/161051 >>> _.factor() [-1, 1; 2, 12; 11, -5; 31, 3] |
lex(...)lex(x,y): Compare x and y lexicographically (1 if x>y, 0 if x==y, -1 if x<y) |
lift(...)EXAMPLES:>>> x = pari("x") >>> a = x.Mod(x**3 + 17*x + 3) >>> a Mod(x, x^3 + 17*x + 3) >>> b = a**4; b Mod(-17*x^2 - 3*x, x^3 + 17*x + 3) >>> b.lift() -17*x^2 - 3*x |
List(...)List(x): transforms the PARI vector or list x into a list. EXAMPLES:>>> v = pari([1,2,3]) >>> v [1, 2, 3] >>> v.type() 't_VEC' >>> w = v.List() >>> w List([1, 2, 3]) >>> w.type() 't_LIST' |
list_str(...)Return str that might correctly evaluate to a Python-list. |
Mat(...)Mat(x): transforms any PARI x into a matrix. EXAMPLES:>>> x = pari(5) >>> x.type() 't_INT' >>> y = x.Mat() >>> y Mat(5) >>> y.type() 't_MAT' >>> x = pari('[1,2;3,4]') >>> x.type() 't_MAT' >>> x = pari('[1,2,3,4]') >>> x.type() 't_VEC' >>> y = x.Mat() >>> y Mat([1, 2, 3, 4]) >>> y.type() 't_MAT' |
max(...)max(x,y): Return the maximum of x and y. |
min(...)min(x,y): Return the minumum of x and y. |
Mod(...)Mod(x, y): creates the object x modulo y. INPUT: x -- gen y -- gen EXAMPLES: >>> z = pari(3) >>> x = z.Mod(pari(7)) >>> x Mod(3, 7) >>> x**2 Mod(2, 7) >>> x**100 Mod(4, 7) >>> x.type() 't_INTMOD' >>> f = pari("x^2 + x + 1") >>> g = pari("x") >>> a = g.Mod(f) >>> a Mod(x, x^2 + x + 1) >>> a*a Mod(-x - 1, x^2 + x + 1) >>> a.type() 't_POLMOD' |
nextprime(...)nextprime(x): smallest pseudoprime >= x |
omega(...)e.omega(): return basis for the period lattice of the elliptic curve e. EXAMPLES:>>> e = pari([0, -1, 1, -10, -20]).ellinit() >>> e.omega() [1.2692093042795534216887946168, 0.63460465213977671084439730838 + 1.4588166169384952293308896128*I] |
Pol(...)Pol(x): convert x (usually a vector or a power series) into a polynomial, starting with the leading coefficient INPUT: x -- gen var -- (optional) which variable OUTPUT: gen -- a polynomial EXAMPLES: >>> v = pari("[1,2,3,4]") >>> f = v.Pol() >>> f x^3 + 2*x^2 + 3*x + 4 >>> f*f x^6 + 4*x^5 + 10*x^4 + 20*x^3 + 25*x^2 + 24*x + 16 >>> v = pari("[1,2;3,4]") >>> v.Pol() [1, 3]~*x + [2, 4]~ |
polcoeff(...)EXAMPLES:>>> f = pari("x^2 + y^3 + x*y") >>> f x^2 + y*x + y^3 >>> f.polcoeff(1) y >>> f.polcoeff(3) 0 >>> f.polcoeff(3, "y") 1 >>> f.polcoeff(1, "y") x |
polgalois(...)polgalois(x): Galois group of the polynomial x |
polisirreducible(...)polisirreducible(x): Returns True if x is an irreducible non-constant polynomial, or False if x is reducible or constant. |
Polrev(...)Polrev(x): convert x (usually a vector or a power series) into a polynomial, starting with the constant INPUT: x -- gen OUTPUT: gen -- a polynomial EXAMPLES: >>> v = pari("[1,2,3,4]") >>> f = v.Polrev() >>> f 4*x^3 + 3*x^2 + 2*x + 1 >>> f*f 16*x^6 + 24*x^5 + 25*x^4 + 20*x^3 + 10*x^2 + 4*x + 1 Note that Polrev does *not* reverse the coefficients of a polynomial! >>> f.Polrev() 4*x^3 + 3*x^2 + 2*x + 1 >>> v = pari("[1,2;3,4]") >>> v.Polrev() [2, 4]~*x + [1, 3]~ |
polroots(...)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. |
python(...)Return Python eval of self. |
python_list(...)Return a Python list of the PARI gens. This object must be of type t_VEC INPUT: None OUTPUT: list -- Python list whose elements are the elements of the input gen. EXAMPLES: >>> v=pari([1,2,3,10,102,10]) >>> w = v.python_list() >>> w [1, 2, 3, 10, 102, 10] >>> type(w[0]) <type 'py_pari.gen'> |
Qfb(...)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 INPUT: a -- gen b -- gen c -- gen D -- gen OUTPUT: gen -- binary quadratic form EXAMPLES: >>> pari(3).Qfb(7, 2) Qfb(3, 7, 2, 0.E-28) |
shift(...)shift(x,n): shift x left n bits if n>=0, right -n bits if n<0. |
shiftmul(...)shiftmul(x,n): Return the product of x by 2^n (n>=0 or n<0). |
sign(...)sign(x): Return the sign of x, where x is of type integer, real or fraction. |
subst(...)EXAMPLES:>>> x = pari("x"); y = pari("y") >>> f = x**3 + 17*x + 3 >>> f.subst(x, y) y^3 + 17*y + 3 >>> f.subst(x, "z") z^3 + 17*z + 3 >>> f.subst(x, "z")**2 z^6 + 34*z^4 + 6*z^3 + 289*z^2 + 102*z + 9 >>> f.subst(x, "x+1") x^3 + 3*x^2 + 20*x + 21 >>> f.subst(x, "xyz") xyz^3 + 17*xyz + 3 >>> f.subst(x, "xyz")**2 xyz^6 + 34*xyz^4 + 6*xyz^3 + 289*xyz^2 + 102*xyz + 9 |
vecmax(...)vecmax(x): Return the maximum of the elements of the vector/matrix x, |
vecmin(...)vecmin(x): Return the maximum of the elements of the vector/matrix x, |
zeta(...)zeta(s): Riemann zeta function at s with s a complex or a p-adic number. INPUT: s -- gen (real or complex number OUTPUT: gen -- value of zeta at s. EXAMPLES: |
Class Variable Details |
---|
__pyx_vtable__
|
Home | Trees | Index | Help |
|
---|
Generated by Epydoc 2.1 on Sun May 1 19:07:50 2005 | http://epydoc.sf.net |