修正前:(defconstant texport *standard-output*)
↓
修正後:(setq texport *standard-output*)
(%ixx) 1+1; →で、Enterキーを押すと
(%oxx) 2 →計算結果が表示される
(%ixx) 1/2+1/3; →分数の計算は
(%oxx) 5/6 →有理数のまま計算されるので、誤差が抑えられる
(%ixx) float(%); →少数で表示したい場合は、floatやbfloatを使う
(%oxx) 0.833333333333333
(%ixx) A:123;
B:456;
C:789;
A+B*C;
(%oxx) 123
(%oxx) 456
(%oxx) 789
(%oxx) 359907
(%ixx) ABC:A+B*C+D;
(%oxx) D+359907;
(%ixx) ABC:A+B*C+D;
(%oxx) D + B C + A
(%ixx) subst(2,D,ABC);
(%oxx) B C + A + 2
(%ixx) ABC:A+B*C+D;
(%oxx) D + B C + A
(%ixx) sublis([A=1,B=2,C=3,D=4],ABC);
(%oxx) 11
F(x) := a*x^2 + a*b*x + b^2;
f(x,y) := (x^2+x*y)/y;
ABCD() := A+B*C+D;
f(x):=diff(sin(x),x); →これはうまく行かない
define(f(x),diff(sin(x),x));
(%ixx) solve(3*x^2+2*x-1,x);
(%oxx) [x=1/3,x=-1]
(%ixx) solve([x^2+3*y=4,x+2*y=1],[x,y]);
(%oxx) [[x=-1,y=1],[x=5/2,y=-3/4]]
siki2 : a*x^2+b*x+c=0;
solve(siki2,x);
[x=-(sqrt(b^2-4*a*c)+b)/(2*a),x=(sqrt(b^2-4*a*c)-b)/(2*a)]
x' = ax + by + c
y' = dx + ey + f
af:[xx1=a*x1+b*y1+c,yy1=d*x1+e*y1+f,xx2=a*x2+b*y2+c,yy2=d*x2+e*y2+f,xx3=a*x3+b*y3+c,yy3=d*x3+e*y3+f];
solve(af,[a,b,c,d,e,f]);
[[a=(xx1*(y3-y2)-xx2*y3+xx3*y2+(xx2-xx3)*y1)/(x1*(y3-y2)-x2*y3+x3*y2+(x2-x3)*y1),b=(x1*(xx3-xx2)-x2*xx3+x3*xx2+(x2-x3)*xx1)/(x1*(y3-y2)-x2*y3+x3*y2+(x2-x3)*y1),c=-
(x1*(xx3*y2-xx2*y3)+xx1*(x2*y3-x3*y2)+(x3*xx2-x2*xx3)*y1)/(x1*(y3-y2)-x2*y3+x3*y2+(x2-x3)*y1),d=(y2*yy3+y1*(yy2-yy3)-y3*yy2+(y3-y2)*yy1)/(x1*(y3-y2)-x2*y3+x3*y2+(x2-x3)*y1),e=-
(x2*yy3+x1*(yy2-yy3)-x3*yy2+(x3-x2)*yy1)/(x1*(y3-y2)-x2*y3+x3*y2+(x2-x3)*y1),f=(x1*(y3*yy2-y2*yy3)+y1*(x2*yy3-x3*yy2)+(x3*y2-x2*y3)*yy1)/(x1*(y3-y2)-x2*y3+x3*y2+(x2-x3)*y1)]]
kill(all)$