testcas 6.43 KB
arg(1+i);
arg(1+2*i);
arg((1+2*i)^2);
conj(1+2*i);
conj(1+2*i);
conj((1+2*i)^2);
re(1+2*i);
re((1+2*i)^2);
im(1+2*i);
im((1+2*i)^2);
10;
abs(-4);
abs(1+2*i);
abs((1+2*i)^2);
sign(-4);
gcd(45,75);
gcd(1999,2001);
gcd(x^2-2*x+1,x^3-1);
gcd(x^2+2*x+1,x^2+x-2);
gcd(x^2-2*x+1,x^2+x-2);
20;
idn(4);
idn(7);
normal((x+3)^4);
factor(x^4+12*x^3+54*x^2+108*x+81 );
factor(x^4-1);
int(1/x,x);
int(1/(1+x^2),x);
int(1/(4+x^2),x);
integrate(1/(4+x^2),x);
30;
integrate(1/(1-x^4),x);
inv(3);
inv([[1,2],[3,4]]);
[[1,2],[3,4]]*[[1,2],[3,4]];
[[1,2],[3,4]]*[[-2,1],[-3/-2,inv(-2)]];
normal(-2+-3/-2*2);
normal(-6+-3/-2*4);
ker([[1,2],[3,6]]);
ker([[1,2,3],[1,3,6],[2,5,9]]);
40;
image([[1,2,3],[1,3,6],[2,5,9]]);
image([[1,2],[3,6]]);
pcar([[1,2],[3,4]]);
pcar([[1,2,3],[1,3,6],[2,5,9]]);
pcar([[1,2,3],[1,3,6],[2,5,7]]);
det([[1,2],[3,4]]);
det([[1,2,3],[1,3,6],[2,5,7]]);
det([[1,2,3],[1,3,6],[2,5,9]]);
tran([[1,2,3],[1,3,6],[2,5,9]]);
50;
tran([[1+i,2,3],[1,3,6],[2,5,9-i]]);
subst(1/(4+x^2),x=2);
subst(1/(4+x^2),x=2);
subst(x-2/(4+x^2),x=2);
partfrac((x-2)/(4-x^2));
partfrac((x^2-2*x+3)/(x^2-3*x+2));
derive((x^2-2*x+3)/(x^2-3*x+2),x);
derive(1/(x^2-3*x+2),x);
derive((x^2-2*x+3)*(x^2-3*x+2),x);
60;
normal((2*x-2*1)*(x^2-3*x+2)+(x^2-2*x+3)*(2*x-3*1));
limit((x-1)/(x^2-3*x+2),x=1);
limit(sin(x)/(x^2-3*x),x=0);
limit((2*x-1)/exp(1/(x-1)),x=+infinity);
limit((n*tan(x)-tan(n*x))/(sin(n*x)-n*sin(x)),x=0);
simplify(sin(3*x)/sin(x));
series(sin(x)/(x^2-pi*x),x=pi);
series(sin(x)/(x^2-pi*x),x=pi,2);
series((sin(x)-sin(1))/(x^2-3*x+2),x=1,2);
70;
rref([[3,1,-2],[3,2,2]]);
rref([[2,1,1,-1],[1,1,2,-1],[1,2,1,-4]]);
tlin(sin(x)^3);
tlin(4*cos(x)^2-2);
tlin(cos(x)^3);
tlin(cos(x)*cos(y));
texpand(cos(x+y));
texpand(cos(3*x));
normal(texpand((cos(3*x)+cos(7*x))/cos(5*x)));
80;
normal(texpand((sin(3*x)+sin(7*x))/sin(5*x)));
simplify(texpand((cos(3*x)+cos(7*x))/cos(5*x)));
simplify(texpand((sin(3*x)+sin(7*x))/sin(5*x)));
limit(1/x,x=0,-1);
limit(1/x,x=0,1);
limit((sin(t)-2*sin(t)*cos(t))/(-1+2*cos(t)^2-cos(t)),t=pi/3,1);
simplify(limit((sin(t)-2*sin(t)*cos(t))/(-1+2*cos(t)^2-cos(t)),t=pi/3,1));
limit((sin(t)-2*sin(t)*cos(t))/(-1+2*cos(t)^2-cos(t)),t=2*pi/3,1);
limit(simplify((sin(t)-2*sin(t)*cos(t))/(-1+2*cos(t)^2-cos(t))),t=2*pi/3,1);
90;
simplify(limit(sin(t)-2*sin(t)*cos(t),t=2*pi/3,1));
limit(sin(t)-2*sin(t)*cos(t),t=2*pi/3,1);
factor(sin(x)-2*sin(x)*cos(x))/factor(-1+2*cos(x)^2-cos(x));
subst((sin(x)-2*sin(x)*cos(x))/(-1+2*cos(x)^2-cos(x)),x=pi/3);
simplify(subst((sin(x)-2*sin(x)*cos(x))/(-1+2*cos(x)^2-cos(x)),x=pi/3));
iquo(25,15);
iquo(125,15);
iquo(125,41);
irem(25,15);
100;
irem(125,41);
gcd(125,41);
gcd(125,15);
iquo(1234567891234567,7849);
iquo(167953,7849);
iquo(1234567891234567,7849);
jordan([[1,1],[0,1]]);
egvl([[1,1],[0,1]]);
egv([[1,1],[0,1]]);
egv([[3,1,1],[1,3,1],[1,1,3]]);
egvl([[3,1,1],[1,3,1],[1,1,3]]);
egvl([[1,1,3],[1,3,1],[3,1,1]]);
jordan([[3,1,1],[1,3,1],[1,1,3]]);
jordan([[3,1,1],[1,3,1],[1,1,3]]);
jordan([[4,1,-2],[1,2,-1],[2,1,0]]);
egv([[4,1,-2],[1,2,-1],[2,1,0]]);
egvl([[4,1,-2],[1,2,-1],[2,1,0]]);
jordan([[1,1],[1,1]]);
jordan([[1,2,0],[0,1,2],[0,0,1]]);
jordan([[1,0,2],[0,1,0],[0,0,1]]);
jordan([[1,2,2],[0,1,2],[0,0,1]]);
jordan([[3,1,0,0],[-4,-1,0,0],[7,1,2,1],[-17,6,-1,0]]);
jordan([[1,0,2],[0,1,2],[0,0,1]]);
jordan([[-2,-2,1],[-2,1,-2],[1,-2,-2]]);
jordan([[1,1,-1,2,-1],[2,0,1,-4,-1],[0,1,1,1,1],[0,1,2,0,1],[0,0,-3,3,-1]]);
jordan([[1,1],[0,1]]);
cyclotomic(20);
cyclotomic(4);
cyclotomic(1);
diff(x^3-x,x);
diff(x*y+x);
diff(x*y,y);
diff(x*y+x,y);
diff(x*y+x,x);
diff(x*y+z*y);
diff(x^3-x*y+2*y^4*z,y);
diff(x^3-x*y,y);
e2r(-x^4+x*3+2.1);
e2r(x*3+2.1);
e2r(-x^4+x*3*y+2.1,y);
e2r(-x^4+x*3*y+2.1+y^2*z,y);
fdistrib((y+x)*(z+1));
fdistrib((y+x)*(z+1)^2);
fdistrib((y+x)*(z+y)*(x+z));
ichinrem([12,7],[13,5]);
ichinrem([2,7],[3,5]);
ichinrem([7,10],[13,5]);
ichinrem([8,10],[13,5]);
ichinrem([12,10],[13,5]);
is_prime(9856989898997);
is_prime(1999);
is_prime(25);
is_prime(97160249868928888261606009);
nextprime(9856989898990);
nextprime(97160249868928888261606009);
prevprime(97160249868928888261606009);
prevprime(9716024986892888);
prevprime(9856989898999);
prevprime(9856989898997) ;
solve(x^2-1);
solve(x^2-3=1);
solve(x^2-3);
solve(x^3-3*y,y);
jacobi_symbol(132,5);
jacobi_symbol(132,3);
jacobi_symbol(132,45);
jacobi_symbol(132,25);
lin(exp(x)^2);
lin(exp(x)^5);
lin(exp(x)^2+exp(x)^y);
lin(exp(x)^n+exp(x)^2);
lin((exp(x)^3+exp(x))^2);
lvar(sin(x)*2*y);
lvar(exp(x)*2*sin(y)+ln(x));
lname(exp(x)*2*sin(y)+ln(x)+x);
lname(exp(x)*2*sin(y)+ln(x));
lname(exp(x)*2*y);
resultant(x^3-p*x+q,3*x^2-p,x);
resultant(x^2-1,x^3-1,x);
sign(4-5);
sign(4-4);
sto(2,a_test);
sto('salut',b_test);
r2e([1,2,3],x);
r2e([1,0,5,2,3],x);
r2e([1,0,0,2,3],x);
r2e([1,0,-1],y);
r2e([1,2,-1],y);
quote(1/x+1/(x-1));
quote((x+1)*(x-1));
sort(proot([1,2,-25,-26,120]));
sort(proot([1,0,-2]));
peval([1,0,-2],1);
peval([1,2,-25,-26,120],8);
normal(2*x+y=1);
pcoeff([1,0,-2]);
egvl([[0,1],[2,0]]);
egvl([[0,2],[2,0]]);
egvl([[1,2],[2,1]]);
egv([[0,1],[2,0]]);
egv([[0,2],[2,0]]);
egv([[1,2],[2,1]]);
equal(2*x,2);
2*x=2;
solve(2*x=2);
solve(equal(2*x,2));
eval(2*5*x*2);
eval(2*x*2);
evalf(2*sin(1)*2);
evalf(2*sin(pi)*2);
eval(2*sin(pi)*2);
eval(eval(2*sin(pi/3)*2));
evalf(2*sin(pi/3)*2);
eval(2*sin(pi/3)*2);
evalf(2*sin(pi/6)*2);
eval(2*sin(pi/6)*2);
eval(1/2*3^1/2*2*2);
pcoeff([1.0,0.0,-2.0]);
normal((2*x+1)^2);
normal((2*x*2)^2);
normal(2*x*2);
smod(8,3);
smod(10,3);
smod(10,4);
lcm(6,4);
lcm(9,4);
lcm(1251,123);
lcm(9856989898997,9856989898997^2+1);
irem(957707601542056644794343323422908171970,9856989898997);
iquo(957707601542056644794343323422908171970,9856989898997);
iquo(957707601542056644794343323422908171970,9856989898997^2+1);
eval(9856989898997^2+1);
smod(957707601542056644794343323422908171970,9856989898997^2+2);
smod(957707601542056644794343323422908171970,9856989898998);
FF:=GF(2,2,['a','FF']);
factor(x^3-1,FF(a));
F4:=GF(2,2,['j','F4']);
l:=[0,F4(j)];
([u,v]$(u=l))$(v=l); 
P:=x^2+1/2*x+1/3;
coeff(P,x,2);
A:=companion((x^2-2)^2,x);
jordan(A);
A:=companion((x^3-2)^2,x) ;
jordan(A);
A:=companion(x^3+2,x);
jordan(A);
p:=(x^2+2)/3;
horner(p,a);
k:=5;
A:=matrix(k,k,(l,j)->rand(21)-10.1);
B:=A-X*identity(k);
simplify(det(B));
factor(x^4+1,exp(i*pi/4));
factor(x^4+1,exp(i*pi/4)+1);
A:=[[1,2],[3,4]];
B:=approx(A);
inv(B);
F:=GF(3,3,['u','F']) ;
b:=F(u) ;
factor(x^4-1,b) ;
factor(x^3-x-1,b);
G:=GF(7,7,[a,G]) ;
b:=G(a); factor(x^7-x+1,b);
G:=GF(7,7,['a','G']) ;
b:=G(a);
factor(x^7-x+1,b) ;
M:=[[1,2,3],[-1,0,1],[0,1,1]]; 
(S1,A1,L1,O1):=lll(M); 
factor(T^2*u^4+14*T^2*u^2+T^2+(-2*sqrt(3))*T*u^4+2*sqrt(3)*T-u^4-2*u^2-1);