"Fossies" - the Fresh Open Source Software Archive 
Member "pari-2.13.1/src/test/in/ser" (14 Jan 2021, 2511 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 "ser":
2.13.0_vs_2.13.1.
1 default(realprecision,38);
2 s=x+x^2+O(x^5)
3 f=[atan,asin,acos,cosh,sinh,tanh,cotanh,acosh,asinh,atanh];
4 {
5 for (i=1,#f,
6 print(f[i](s));
7 print(f[i](O(x^5)));
8 print(f[i]([Pol(1)]));
9 )
10 }
11 O(x^-2)
12 O(1/x^2)
13 trace(I*x+1+O(x^2))
14 norm(I*x+1+O(x^2))
15 a=Ser(vector(200,i,i));
16 a^2 == a*(a+1) - a \\ test RgX_mullow, RgX_sqrlow
17 3+O(1)
18 serreverse(x/2+O(x^2))
19 serreverse(tan(x)/2)
20
21 iferr(sqrt(x+1/y),E,E)
22
23 \\ #2063
24 ((y^-3+O(y))*x+1)/x
25
26 s = 1/x + x + 2*x^2 + O(x^3);
27 serchop(s)
28 serchop(s, 2)
29 serchop(s, 100)
30 s = Mod(0,3) + x + O(x^2)
31 serchop(s)
32 serchop(Mod(0,3)+O(x^2))
33 serchop(Mod(0,3)*x+O(x^2))
34
35 Ser(Qfb(1,2,3))
36 Ser(Qfb(1,2,3),, 5.5)
37 Ser(Qfb(1,2,-5))
38 Ser(Qfb(1,2,-5),y,2)
39 Ser([1,2,3], y, 5)
40 Ser([1,2,3]~, y, 5)
41 Ser([],,3)
42 Ser(Vecsmall([1,2,3]), y, 5)
43 Ser(x+O(x^2),,3)
44 Ser(O(x^2),,3)
45 Ser(x+x^2+x^3+O(x^4),,2)
46 Ser(x^2+x^3,x,0)
47 Ser(1+x,x,0)
48 Ser(1/(x+1),x,0)
49 Ser(1/x,x,0)
50 Ser(1/y,x,0)
51
52 Ser(x+y+O(x^2),x)
53 Ser(x+y+O(x^2),y)
54 s = Ser(Mod(0,7))
55 Ser(Mod(1,7)*(x^4+x^2), x,3)
56 s+O(x^16)
57 s+Mod(1,7)
58 s+Mod(1,7)*x
59 s/x
60 s'
61 deriv(s,y)
62 trace(s)
63 round(s)
64 round(s,&e)
65 lift(s)
66 lift(s,x)
67 liftint(s)
68 O(x^2)*0
69 deriv(Mod(2,4)*x^2+O(x^3))
70 x^3*(1+O(y^2))
71 Mod(1,3)*x^3*(1+O(y^2))
72 O(x)/2
73 s = O(3^2)+O(x);
74 s/3
75 s/2
76 s*3
77 (1+O(x))^2
78 1/(x+0.)+O(x^2)
79 [1==O(x), 1==O(x^0), 1==O(x^-1)]
80 [-1==O(x), -1==O(x^0), -1==O(x^-1)]
81 [2==O(x), 2==O(x^0), 2==O(x^-1)]
82
83 a=Mod(3,9) + O(x^2); b=Mod(3,9) + O(x^2); a*b
84
85 a=1./x+O(1);a-a
86 a=1/x+O(1);a-a
87 a=Mod(1,2)/x+O(1);a-a
88
89 Mod(0,5) * O(x^1)
90 Mod(1,5) * O(x^0)
91 O(x^0) / Mod(1,5)
92
93 subst(1+O(x),x,y)
94 subst(1+x+O(x^2),x,y^2)
95 O(1)==O(x)
96 O(1)==x
97 O(x)==1
98
99 \\ #2188
100 S = x+O(x^2);T = O(y) + x + O(x^2); T==S
101 S = x+O(x^2);T = O(y) + x + x^2 + O(x^3); T==S
102 S = x+O(x^2);T = O(y) + O(x); T==S
103 S = x+x^2+ O(x^3);T = O(y) + x + O(x^2); T==S
104
105 exp(x+O(x^200))*exp(-x+O(x^200))
106 exp(x+O(x^200))^2==exp(2*x+O(x^200))
107
108 subst(1+x^3+O(x^6),x,x+O(x^4))
109 subst(1+x^2+O(x^6),x,x+O(x^3))
110 subst(1+x^3+x^4+O(x^6),x,x+x^2+O(x^3))
111
112 subst(x^2+O(x^3),x,0*x)
113 subst(x^2+O(x^3),x,Mod(0,3)*x)
114 subst(x^2+O(x^3),x,O(3)*x)
115 subst(1+x+O(x^2),x,0*x)
116 subst(1+x+O(x^2),x,Mod(0,3)*x)
117 subst(1+x+O(x^2),x,O(3)*x)
118 subst(1+x^2+O(x^3),x,z)
119 subst(1+x^2+y^2+O(x^3),x,z)
120
121 laurentseries(x->sin(x)/x^2, 3)
122 laurentseries(x->sin(x)/x^2, 3, t)
123 laurentseries(x->(cos(x)-1)/x)
124
125 \\ Errors. Keep at end of file
126 subst(x^-1+O(x),x,Mod(0,3))
127 subst(O(x^-1),x,Mod(0,3))
128 subst(x^-1+O(x),x,0*x)
129 subst(O(x^-1),x,0*x)
130 Ser(1/x,y)
131 Ser(x,y)
132 Ser([x],y)
133 Ser(x,, -5)
134 Ser("")
135 O(13^-5)/Mat(Mod(2,26)*y*x+(Mod(1,2)*y^-1+O(y^3)))
136 laurentseries(1)
137 laurentseries((x,y)->1)
138 O(x) / Mod(0,5)
139 O(x) / O(y)
140 O(y) / O(x)