CLisp command

Mac install clisp

$ brew clisp
read file and run ==> $ clisp -i file

emacs-lisp では、虚数計算はできない。
emacs.htmlへ

[1]>(exit) 終了

CALC

expt

[1]> (expt 2 200)
1606938044258990275541962092341162602522202993782792835301376
[2]> (expt 10 (/ 1 3))
2.1544347

sqrt

[3]> (sqrt 2)
1.4142135
[4]> (sqrt -3)
#C(0 1.7320508)


log

[5]> (log 1000 10)
3
[6]> (LOG 1000)
6.9077554
[7]> (LOG 8 2)
3


angle functions

[8]> (COS 30)
0.15425146
[9]> (COS PI)
-1.0L0
[10]> (cos (/ pi 6))
0.8660254037844386468L0
[11]> (tan (/ pi 3))
1.7320508075688772935L0


Complex number

[12]> (+ #c(10 20) #c(30 40))
#C(40 60)
[13]> (/ 100 #c(30 40))
#C(6/5 -8/5)
[14]> (abs (#c(6/5 -8/5))
2

エラーの時
Break 1 [er] >
:a
を打つ
[er+1]> 入力状態に戻る

home