HOME > > Maxima LISP

Maxima LISP

腟贋逸?

Maxima LISP 筝уMaxima 篁罕ゃゃ LISP

LISP 絮ゆ「罎羈

LISP 絮ゃ

Maxima to_lisp() ゃLISP 絮ゃсLISP 絮ゃ (to-maxima) ゃMaxima 絮ゃ祉с

(%i1) to_lisp();
Type (to-maxima) to restart

MAXIMA> (+ 1 2)
3
MAXIMA> (to-maxima)
Returning to Maxima
(%o1)                                TRUE
(%i2) 1 + 2;
(%o2)                                  3
(%i3)

Maxima 絮ゃ障障 LISP 巡擦絎茵:lisp 緇膓 LISP 巡擦吾違ュ緇 ; 筝荀с

(%i1) :lisp (+ 1 2)
3
(%i1)

Maxima 垩蚊障

http://maxima.sourceforge.net/docs/manual/en/maxima_3.html#SEC7

激潟絲上

Maxima 絮ゃ LISP 絮ゃс激潟絲上茲с「罎綽荀ヨ絨Maxima $foo LISP |$foo| Maxima $FOO LISP |$FOO| Maxima $Foo LISP |$Foo| 娯絲上ャc違ゃ障LISP 絮ゃс激潟 | | у蚊сLISP 絮ゃс| | у蚊激潟篁ュ篏帥違荅宴膂≦с

http://maxima.sourceforge.net/docs/manual/en/maxima_3.html#SEC7

激潟ゃゃ潟帥若潟

Maxima 激潟ュс激潟 Lisp 絮ゃсゃ潟帥若潟

(%i16) :lisp (apropos "mysymbol")

(%i16) mysymbol;
(%o16)                             mysymbol
(%i17) :lisp (apropos "mysymbol")
|$mysymbol|
(%i17) mysymbol: 10;
(%o17)                                10
(%i18) :lisp (apropos "mysymbol")
|$mysymbol|                                variable
(%i18)

違蚊綵

Maxima с羲膊絖 : 篏帥c激潟違蚊綵鐚assign鐚с LISP 絮ゃц帥

(%i1) x: 100;
(%o1)                                 100
(%i1) :lisp (symbol-value '|$x|)
100

激潟 x鐚LISP 絮ゃ |$x| 鐚ゃ祉 100 ャc障c膂≦LISP 絮ゃс x 荅箴<100 緇

(%i2) :lisp |$x|
100
(%i2)

∽違蚊綵

:= 羲膊絖篏帥c激潟∽違蚊綵激潟∽違祉∽医臂ャ篋潟

(%i1) f(x):= x+1;
(%o1)                            f(x) := x + 1
(%i2) :lisp (symbol-function '|$f|)
Maxima encountered a Lisp error:

 SYMBOL-FUNCTION: undefined function |$f|

Automatically continuing.
To reenable the Lisp debugger set *debugger-hook* to nil.

絎臂障

(%i2) :lisp (symbol-plist '|$f|)
(MPROPS (NIL MEXPR ((LAMBDA) ((MLIST) $x) ((MPLUS) $x 1))))

∽医臂綣f潟鴻c絮с祉ャc綵吟Maxima у臂∽違 LISP с障鞘戎с

(%i2) :lisp (|%f| 1)
Maxima encountered a Lisp error:

 EVAL: undefined function |%f|

Automatically continuing.
To reenable the Lisp debugger set *debugger-hook* to nil.

障cMaxima у臂∽違 LISP т戎mfuncall ∽違

(%i2) :lisp (mfuncall '|$f| 2)
3
(%i2)

遺札紊蚊綵

激潟遺札紊蚊綵с違x + y 蚊綵

(%i1) a: x+y;
(%o1)                                y + x
(%i2) :lisp (symbol-value '|$a|)
((MPLUS SIMP) $x $y)

LISP 絮ゃ荀激潟ゃ祉綣鴻綵≪cャc肴сゃ障

(%i2) :lisp (set '|$b| '((MPLUS SIMP) |$x| |$y|))
((MPLUS SIMP) $x $y)
(%i2) b;
(%o2)                               y + x

膈с

y + x ((MPLUS SIMP) $x $y) 吾荀 Maxima с茵憗с緇 LISP 絮ゃс茵憗сャ茵憗腆冴LISP

(%i3) :lisp (displa '((MPLUS SIMP) 1 2))
2 + 1
NIL
(%i3)

displa ∽違ゃ違Maxima 羌茵憗ャсMaxima 羌茵憗 #$ $ с LISP 筝т戎сс腆冴с

(%i3) :lisp #$x+y$
((MPLUS SIMP) $x $y)

сMaxia 筝 x 1 y 2 : 羲膊絖篏帥c蚊綵a 荅箴<帥3

(%i3) x:1;
(%o3)                                  1
(%i4) x:2;
(%o4)                                  2
(%i5) a;
(%o5)                                y + x

cMaxima с激潟荅箴<ゃ茵腓冴LISP 絮ゃс激潟荅箴<蕁篌若

激潟с激潟ゃ荅箴<翫Maxima с ev ∽違篏帥違

(%i8) ev(a);
(%o8)                                  3

Maxima ev ∽違LISP eval ∽違蕁篌若蕁篌若сcMaxima ev LISP eval 篏帥cс((MPULUS SIMP) $x $y) LISP 障上茵с鴻綵≪с

罨≠
HOME


紕膣
薤藕

茯絖
沿
ユ茯


遵医