"Fossies" - the Fresh Open Source Software Archive

Member "pari-2.13.1/src/test/in/subst" (14 Jan 2021, 2432 Bytes) of package /linux/misc/pari-2.13.1.tar.gz:


As a special service "Fossies" has tried to format the requested text file into HTML format (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file. See also the latest Fossies "Diffs" side-by-side code changes report for "subst": 2.13.0_vs_2.13.1.

    1 p; q;
    2 subst(Y/X,X,x)
    3 substvec(x+y,[x,y],[1,x])
    4 
    5 \\ #1321
    6 v = [p + w*q, w*p + q] * Mod(1, w + 1);
    7 substvec(x+y, [x, y], v)
    8 \\ #1447
    9 subst(O(x^2),x,0*x)
   10 subst(x+O(x^2),x,Mod(1,3))
   11 subst(x+O(x^2),x,Mod(0,3))
   12 subst(1/x+O(x^2),x,Mod(0,3))
   13 subst(2+x+O(x^2),x,Mod(0,3))
   14 subst(Pol(0),x,Mod(1,3))
   15 subst(Pol(0),x,Mod(1,3)*matid(2))
   16 subst(Pol(1),x,Mod(1,3))
   17 subst(Pol(1),x,Mod(1,3)*matid(2))
   18 subst(y+1,x,Mod(1,3)*matid(2))
   19 subst(1+y+O(y^2),x,Mod(1,3)*matid(2))
   20 subst(1,x,Mod(1,3)*matid(2))
   21 subst(0,x,Mod(1,3)*matid(2))
   22 subst(Pol(0),x,Mat(Mod(1,3)))
   23 subst(Pol(1),x,Mat(Mod(1,3)))
   24 subst(1,x,Mat(Mod(1,3)))
   25 subst(0,x,Mat(Mod(1,3)))
   26 
   27 type(subst(Pol(0),'y,1))
   28 type(subst(Pol(0),'x,1))
   29 type(subst(Pol(0),'y,Mod(1,3)))
   30 type(subst('u^0,u,x))
   31 type(subst('x^0,'y,1))
   32 type(subst('x*'y,'y,0))
   33 
   34 subst(x+1, x, [2,3])
   35 subst(x+1, x, [2,3]~)
   36 substpol(x,1/x,y)
   37 substpol(Mod(x*y^2, y^3*x^2+1), y^2,y)
   38 substpol(x*y^2/(y^3*x^2+1), y^2,y)
   39 substpol(List(), y^2,y)
   40 substpol(List(x^2*y^2), y^2,y)
   41 substpol(x^2+y^3*x^3+O(x^4),y^2, y)
   42 variables(substpol(x,1/x,t))
   43 variables(substpol(x+1+1/x,x+1/x,t))
   44 
   45 subst(1,x,[;])
   46 subst(1,x,Mat([1,2]))
   47 subst(x^2+x^3+O(x^4),x, 2*y+O(y^2))
   48 
   49 substpol(1+O(x^2),x^2,x)
   50 substpol(x^2+O(x^4),x^2,x)
   51 substpol(x+O(x^4),x^2,x)
   52 substpol(1,x^2,x)
   53 
   54 \\#1727
   55 substvec(1+x+y+x*y+O(x^2), [x,y],[x,y])
   56 
   57 subst(Mod(1/z,y),z,x)
   58 \\#1988
   59 subst(Mod(-a,a^2-2),z,0)
   60 
   61 subst(((-6*t^2-t)*u^4+(t^2)*u^3+(P)*t^3*u)/u^2,t,0)
   62 
   63 \\#2264
   64 p=s1*x+s1*x^2+(1/2*s1^2+s1+s2)*x^3+(1/6*s1^3+3/2*s1^2+(s2+1)*s1+(s2+s3))*x^4+(1/24*s1^4+7/6*s1^3+(1/2*s2+3)*s1^2+(3*s2+(s3+1))*s1+(1/2*s2^2+2*s2+(s3+s4)))*x^5+(1/120*s1^5+5/8*s1^4+(1/6*s2+25/6)*s1^3+(7/2*s2+(1/2*s3+5))*s1^2+(1/2*s2^2+7*s2+(3*s3+(s4+1)))*s1+(3/2*s2^2+(s3+2)*s2+(s3+(s4+s5))))*x^6+(1/720*s1^6+31/120*s1^5+(1/24*s2+15/4)*s1^4+(5/2*s2+(1/6*s3+65/6))*s1^3+(1/4*s2^2+13*s2+(7/2*s3+(1/2*s4+15/2)))*s1^2+(7/2*s2^2+(s3+13)*s2+(6*s3+(3*s4+(s5+1))))*s1+(1/6*s2^3+9/2*s2^2+(3*s3+(s4+3))*s2+(1/2*s3^2+2*s3+(2*s4+(s5+s6)))))*x^7+(1/5040*s1^7+7/80*s1^6+(1/120*s2+301/120)*s1^5+(31/24*s2+(1/24*s3+175/12))*s1^4+(1/12*s2^2+91/6*s2+(5/2*s3+(1/6*s4+70/3)))*s1^3+(15/4*s2^2+(1/2*s3+36)*s2+(25/2*s3+(7/2*s4+(1/2*s5+21/2))))*s1^2+(1/6*s2^3+14*s2^2+(7*s3+(s4+22))*s2+(1/2*s3^2+11*s3+(7*s4+(3*s5+s6))))*s1+(7/6*s2^3+(1/2*s3+17/2)*s2^2+(7*s3+(3*s4+(s5+3)))*s2+(3/2*s3^2+(s4+2)*s3+(2*s4+(s5+(s6+s7))))))*x^8+O(x^9);
   65 subst(p, x, x); \\ takes oo time if content(p) is computed
   66 
   67 \\#2267
   68 subst(O(y) + x + O(x^2), x, (1 - y + O(y^2))*x + O(x^2))