reset(); /*Input cell*/

Text sell

? factor;

?? factor;

example(factor);

factor(x^2-3*x+2);

5+2^2;

%+1;

%th(2)-3;

_+4;

%th(2)*3; 15*3$ 4^5;

%;

%th(3);

%i6+1;

%o5+1;

chebyshev_t(4, z);

load("orthopoly");

chebyshev_t(4, z);

expand(%);

alias(T, chebyshev_t);

T(4, z);

a: 3;
integerp(a);

b: 3.14;
floatnump(b);

bb: bfloat(b);
bfloatp(bb);

float(2.5b5);

c:3/4;
ratnump(c);

d: rationalize(b);
ratnump(d);

e: float(d);

f: string(d);
stringp(f);

g: parse_string(f);
ratnump(g);

rationalize(0.5);

rationalize(0.1);

fpprec: 5;

rationalize(0.1b0);

fpprec: 20;

a: rationalize(0.1b0);

float(a);

factor(123345234);

ifactors(123345234);

isqrt(123345234);

n: next_prime(123345234);

primep(n);

factor(n);

pi;

%pi;

sin(pi);

sin(%pi);

a: float(%pi);

rationalize(%pi);

rationalize(a);

a: float(%e);

p: 3*x^2*z+4*x*y;

op(p);

part(p, 0);

part(p, 1);
part(p, 2);

part(p, 1, 0);
part(p, 1, 1);
part(p, 1, 2);
part(p, 1, 3);
part(p, 1, 4);

part(p, 1, 2, 0);
part(p, 1, 2, 1);
part(p, 1, 2, 2);

args(p);

subst("*", "+", p);

substpart("+", p, 1, 0);

q: x/y;

part(q, 0);
part(q, 1);
part(q, 2);

reset();

a;

kill(a);

a;

b;

kill(all);

b;

5r:28;

x: 10; y: x;

x: 11; y;

b: a; a: 10;

b;

ev(b);

a: 11;
b;
ev(b);

c: 10; d: 'c; e: 'd; f: 'e;

c: 11; f; ev(f);

ev(f, eval); ev(f, eval, eval);

kill(d); ev(f, eval, eval);

[a, b, c]: [45, 67, 89];

a;

[a, b]: [b, a];

kill(all); %i^2;

z: 3*%i+9;

w: 1+2*%i;

z*w;

expand(%);

realpart(z);

imagpart(z);

r: abs(z);

phi: carg(z);

r*exp(phi*%i);

rectform(%);

sqrt(x^2);

a: expand((1-%i)^2);
b: expand((-1+%i)^2);

sqrt(a);
sqrt(b);

rectform(sqrt(a));
rectform(sqrt(b));

sols: rectform(solve(x^2-a, x));
s: map(rhs, sols);

kill(all); p: x^3 + a*x^2 + b*x + c;

sols: solve(p, x);

x1: random(10000);
x2: random(10000);
x3: random(10000);

sp: (x-x1)*(x-x2)*(x-x3);

spe: expand(sp);

a: coeff(spe, x, 2);
b: coeff(spe, x, 1);
c: coeff(spe, x, 0);

ev(p);

ev(sols);

(map(rhs, float(rectform(ev(sols)))));

[x1, x2, x3];

a: mod(6*4, 7);

mod(a/6, 7);

mod(a*inv_mod(6, 7), 7);

inv_mod(6, 8);

zn_mult_table(7);

p: alpha^2+3*alpha+5;

factor(p);

modulus: 3;
factor(p); 

modulus: 7;
factor(p);

tellrat(p);

ev(p);

ev(ratdisrep(rat(p)), algebraic);

a: 4*alpha+3;
b: 2*alpha+5;

c: expand(a*b);

ev(ratdisrep(rat(c)), algebraic);

modulus: false;

ev(ratdisrep(rat(c)), algebraic);

inv_mod(a, 7);

ev(ratdisrep(rat(1/a)), algebraic);

modulus: 7;
ev(ratdisrep(rat(1/a)), algebraic);