言語エンジンeng_langの環境設定

HOME <- system("echo ${HOME}", intern=T)
setup_file <- paste(HOME,"/bin/eng_lang_setup.R",sep="")  
source(setup_file)
## === knitr, (reticulate,) eng_lang are go. ===

ツール :

on3env() : on3ライブラリーの環境変数の設定/表示, lispファイル(/tmp/maax_save.lisp)の書き出し

batchload("/home/inoue/Maxlib-20/on3lib21.mx")$   
on3env()$
max_save()$ /* lisp ファイルに書き出す */
## ~/bin/go TMP/tmp_lang/chunk-1.mx  > TMP/tmp_lang/chunk-1.out 2>&1
## batch("/var/www/html/LANG/TMP/tmp_lang/chunk-1.mx")
## read and interpret /var/www/html/LANG/TMP/tmp_lang/chunk-1.mx
## batchload("/home/inoue/Maxlib-20/on3lib21.mx")
## on3env()
## --  <on3env>  logbegin -- 
##     maxima_tempdir = TMP/tmp_maxima  figs_dir = figs 
## max_save()
## save("/tmp/max_save.lisp", all) 
## "/var/www/html/LANG/TMP/tmp_lang/chunk-1.mx"

関数 f2l() : on3関数式をon3リスト形式に変換する

f2l()$
f2l('ex)$
## ~/bin/go TMP/tmp_lang/chunk-2.mxl  > TMP/tmp_lang/chunk-2.out 2>&1
## batch("/var/www/html/LANG/TMP/tmp_lang/chunk-2.mxl")
## read and interpret /var/www/html/LANG/TMP/tmp_lang/chunk-2.mxl
## f2l()
##    --begin of f2l('help)--
##    機能: 関数(式)表現をリスト表現に変換する
##    文法: f2l(expr,...)
##    例示: f2l(f1*log(x)*on3(x,1,2,co)+f0)
##          -> ["+",["*",f1*log(x),[on3,x,1,2,co]],f0]
##    メモ: f2l_one(expr) は式から第1層のリスト表現を返す
##          f2l_one(f1*log(x)*on3(x,1,2,co)+f0)
##          -> ["+",f1*log(x)*on3(x,1,2,co),f0]
##    --end of f2l('help')--
##    
## f2l('ex)
## --begin of f2l('ex)-- 
## ---begin of f2l_ex--- 
## Maxima encountered a Lisp error:
##  Condition in MACSYMA-TOP-LEVEL [or a callee]: INTERNAL-SIMPLE-UNDEFINED-FUNCTION: Cell error on ^RULE1: Undefined function: 
## Automatically continuing.
## To enable the Lisp debugger set *debugger-hook* to nil.
## "/var/www/html/LANG/TMP/tmp_lang/chunk-2.mxl"

関数 l2f() : on3リスト形式をon3関数形式に変換する

l2f()$
l2f('ex)$
## ~/bin/go TMP/tmp_lang/chunk-3.mxl  > TMP/tmp_lang/chunk-3.out 2>&1
## batch("/var/www/html/LANG/TMP/tmp_lang/chunk-3.mxl")
## read and interpret /var/www/html/LANG/TMP/tmp_lang/chunk-3.mxl
## l2f()
##    --begin of l2f('help)--
##    機能: リスト表現から関数(式)表現に変換する
##    文法: l2f(L,...)
##    例示: L : ["+",["*",f1,[on3,x,3,4,co]],[on3,x,1,2,co]], 
##         l2f(L) -> f1*on3(x,3,4,co)+on3(x,1,2,co)
##    メモ: l2f(L) は f2l(expr) の逆操作
##    --end of l2f('help')--
##    
## l2f('ex)
## --begin of l2f('ex)-- 
##     L = ["+",["*",f1,[on3,x,3,4,co]],[on3,x,1,2,co]] 
## Maxima encountered a Lisp error:
##  Condition in MACSYMA-TOP-LEVEL [or a callee]: INTERNAL-SIMPLE-UNDEFINED-FUNCTION: Cell error on ^RULE1: Undefined function: 
## Automatically continuing.
## To enable the Lisp debugger set *debugger-hook* to nil.
## "/var/www/html/LANG/TMP/tmp_lang/chunk-3.mxl"

関数 lpup() : リストの指定要素を取り出す

lpup()$
lpup('ex)$
## ~/bin/go TMP/tmp_lang/chunk-4.mxl  > TMP/tmp_lang/chunk-4.out 2>&1
## batch("/var/www/html/LANG/TMP/tmp_lang/chunk-4.mxl")
## read and interpret /var/www/html/LANG/TMP/tmp_lang/chunk-4.mxl
## lpup()
##    --begin of lpup('help)--
##    機能: リストの指定要素を取り出す
##    文法: lpup(list,ind,...)
##    例示:  L:[+,[*,f1,[on3,x,3,4,co]],[on3,x,1,2,co]], lpup(L,[2,2]) ---> f1
##    --end of lpup('help')--
##    
## lpup('ex)
## --begin of lpup('ex)-- 
## --end of lpup('ex)-- 
## "/var/www/html/LANG/TMP/tmp_lang/chunk-4.mxl"

関数 on3vars() : 完全リストからon3関数変数を取り出す

on3vars()$
on3vars('ex)$
## ~/bin/go TMP/tmp_lang/chunk-5.mxl  > TMP/tmp_lang/chunk-5.out 2>&1
## batch("/var/www/html/LANG/TMP/tmp_lang/chunk-5.mxl")
## read and interpret /var/www/html/LANG/TMP/tmp_lang/chunk-5.mxl
## on3vars()
##    --begin of on3vars('help)--
##    機能: 式expに含まれるon3(),またはそのリスト表現からon3関数変数を取り出す.
##    文法: on3vars(expr,...)
##    例示: ex:f1*on3(x,1,2,co)+on(y,3,4,co),             on3vars(ex) ---> [x,y] 
##          ex:[+,[*,f1,[on3,x,1,2,co]],[on3,y,3,4,co]],  on3vars(ex) ---> [x,y]
##    --end of l2f('help')--
##    
## on3vars('ex)
## --begin of on3vars('ex)-- 
## Maxima encountered a Lisp error:
##  Condition in MACSYMA-TOP-LEVEL [or a callee]: INTERNAL-SIMPLE-UNDEFINED-FUNCTION: Cell error on ^RULE1: Undefined function: 
## Automatically continuing.
## To enable the Lisp debugger set *debugger-hook* to nil.
## "/var/www/html/LANG/TMP/tmp_lang/chunk-5.mxl"

関数 on3lrl() : 完全リストからon3関数端点リストを取り出す

on3lrl()$
on3lrl('ex)$
## ~/bin/go TMP/tmp_lang/chunk-6.mxl  > TMP/tmp_lang/chunk-6.out 2>&1
## batch("/var/www/html/LANG/TMP/tmp_lang/chunk-6.mxl")
## read and interpret /var/www/html/LANG/TMP/tmp_lang/chunk-6.mxl
## on3lrl()
##    --begin of on3lrl('help)--
##    機能: 式内のon3()から,またはその完全リストからon3関数端点リストを取り出す.
##         また,端点リストに非数値が含まれるときFALSEを含まれないときTRUEを返す.
##    文法: on3lrl(expr,...)
##    例示: 
##         f0+f1*on3(x,1,2,co) ---> [[x],[[minf,1,2,inf]],[true]]
##         f0+f1*on3(x,1,2,co)*on3(y,3,4,co) 
##           ---> [[x,y],[[minf,1,2,inf],[minf,3,4,inf]],[true,true]] 
##    --end of l2f('help')--
##    
## on3lrl('ex)
## --begin of on3lrl('ex)-- 
## Maxima encountered a Lisp error:
##  Condition in MACSYMA-TOP-LEVEL [or a callee]: INTERNAL-SIMPLE-UNDEFINED-FUNCTION: Cell error on ^RULE1: Undefined function: 
## Automatically continuing.
## To enable the Lisp debugger set *debugger-hook* to nil.
## "/var/www/html/LANG/TMP/tmp_lang/chunk-6.mxl"

関数 on3typep() : 式からon3式タイプを調べ結果を返す

on3typep()$
on3typep('ex)$
## ~/bin/go TMP/tmp_lang/chunk-7.mxl  > TMP/tmp_lang/chunk-7.out 2>&1
## batch("/var/www/html/LANG/TMP/tmp_lang/chunk-7.mxl")
## read and interpret /var/www/html/LANG/TMP/tmp_lang/chunk-7.mxl
## on3typep()
##    --begin of on3typep('help)--
##    機能: 式からon3式タイプを調べ結果を返す 
##         on3noe(非on3式), on3monoone(on3単項式,関数部1), on3mono(on3単項式),
##         on3inv(on3分数式), on3poly(on3多項式), on3polyinv(on3有理式),
##         on3unknown(その他のon3式),
##    文法: on3typep(expr,...)
##    例示: 
##    --end of on3typep('help')--
##    
## on3typep('ex)
## --begin of on3typep('ex)-- 
## Maxima encountered a Lisp error:
##  Condition in MACSYMA-TOP-LEVEL [or a callee]: INTERNAL-SIMPLE-UNDEFINED-FUNCTION: Cell error on ^RULE1: Undefined function: 
## Automatically continuing.
## To enable the Lisp debugger set *debugger-hook* to nil.
## "/var/www/html/LANG/TMP/tmp_lang/chunk-7.mxl"

関数 on3chgvar2() : on3関数式f(x,y)を変換(t=x+y,u=y)した関数g(t,u)を返す

on3chgvar2()$
on3chgvar2('ex)$
## ~/bin/go TMP/tmp_lang/chunk-8.mxl  > TMP/tmp_lang/chunk-8.out 2>&1
## batch("/var/www/html/LANG/TMP/tmp_lang/chunk-8.mxl")
## read and interpret /var/www/html/LANG/TMP/tmp_lang/chunk-8.mxl
## on3chgvar2()
##    --begin of on3chgvar2('help)--
##    機能: 矩形領域上の2変数関数f(x,y)を変数変換(t=x+y,u=y)した g(t,u) を返す
##    文法: on3chgvar2(func,...)
##    例示: 
##      ex : on3(x,0,1,co)*on3(y,0,1,co)$ on3chgvar2(ex);
##      -> on3(t,1,2,co)*on3(u,t-1,1,cc)+on3(t,0,1,co)*on3(u,0,t,cc)
##      ex : on3(x,0,inf,co)*on3(y,0,inf,co)$ on3chgvar2(ex);
##      -> on3(t,0,inf,co)*on3(u,0,t,cc)
##    --end of on3chgvar2('help')--
##    
## on3chgvar2('ex)
## --begin of on3chgvar2('ex)-- 
## 領域(x,y)を変換{t=x+y,u=y}によって移した領域(t,u)を求める 
## Maxima encountered a Lisp error:
##  Condition in MACSYMA-TOP-LEVEL [or a callee]: INTERNAL-SIMPLE-UNDEFINED-FUNCTION: Cell error on ^RULE1: Undefined function: 
## Automatically continuing.
## To enable the Lisp debugger set *debugger-hook* to nil.
## "/var/www/html/LANG/TMP/tmp_lang/chunk-8.mxl"

関数 on3factor() : on3poly の関数部を因数分解した表現を返す

on3factor()$
on3factor('ex)$
## ~/bin/go TMP/tmp_lang/chunk-9.mxl  > TMP/tmp_lang/chunk-9.out 2>&1
## batch("/var/www/html/LANG/TMP/tmp_lang/chunk-9.mxl")
## read and interpret /var/www/html/LANG/TMP/tmp_lang/chunk-9.mxl
## on3factor()
##    --begin of on3factor('help)--
##    機能: on3poly の関数部を因数分解した表現を返す
##    文法: on3factor(expr,...)
##    例示: ex = x*on3(x,3,4,co)+(x^2-2*x+1)*on3(x,1,2,co)$
##          on3factor(ex);
##          ->  x*on3(x,3,4,co)+(x-1)^2*on3(x,1,2,co)
##    --end of on3factor('help')--
##    
## on3factor('ex)
## --begin of on3factor('ex)-- 
## Maxima encountered a Lisp error:
##  Condition in MACSYMA-TOP-LEVEL [or a callee]: INTERNAL-SIMPLE-UNDEFINED-FUNCTION: Cell error on ^RULE1: Undefined function: 
## Automatically continuing.
## To enable the Lisp debugger set *debugger-hook* to nil.
## "/var/www/html/LANG/TMP/tmp_lang/chunk-9.mxl"

関数 on3iftrue() : 式にon3関数が含まれていればTRUEを返す

on3iftrue()$
on3iftrue('ex)$
## ~/bin/go TMP/tmp_lang/chunk-10.mxl  > TMP/tmp_lang/chunk-10.out 2>&1
## batch("/var/www/html/LANG/TMP/tmp_lang/chunk-10.mxl")
## read and interpret /var/www/html/LANG/TMP/tmp_lang/chunk-10.mxl
## on3iftrue()
##    --begin of on3iftrue('help)--
##    機能: 式にon3関数が含まれていればTRUEを返す
##    文法: on3itrue(expr,...)
##    例示:  ex : f1*on3(x,1,2,co)+f0$  on3ftrue(ex) -> true 
##           ex : f1+f0$  on3ftrue(ex) -> false 
##    --end of on3iftrue('help')--
##    
## on3iftrue('ex)
## --begin of on3iftrue('ex)-- 
## Maxima encountered a Lisp error:
##  Condition in MACSYMA-TOP-LEVEL [or a callee]: INTERNAL-SIMPLE-UNDEFINED-FUNCTION: Cell error on ^RULE1: Undefined function: 
## Automatically continuing.
## To enable the Lisp debugger set *debugger-hook* to nil.
## "/var/www/html/LANG/TMP/tmp_lang/chunk-10.mxl"

関数 loffuncs() : 式に含まれる演算子(関数を含む)からなるリストを返す

loffuncs()$
loffuncs('ex)$
## ~/bin/go TMP/tmp_lang/chunk-11.mxl  > TMP/tmp_lang/chunk-11.out 2>&1
## batch("/var/www/html/LANG/TMP/tmp_lang/chunk-11.mxl")
## read and interpret /var/www/html/LANG/TMP/tmp_lang/chunk-11.mxl
## loffuncs()
##    --begin of loffuncs('help)--
##    機能: 式に含まれる演算子(関数を含む)からなるリストを返す
##    文法: loffuncs(expr,...)
##    例示: ex : f1*on3(x,3,4,co)+on3(x,1,2,co)$  loffuncs(ex) -> ["*","+",on3] 
##           ---> c.f. listofvars(ex2) = [x,f1] 
##    --end of loffuncs('help')--
##    
## loffuncs('ex)
## --begin of loffuncs('ex)-- 
## ---begin of loffuncs_ex--- 
## Maxima encountered a Lisp error:
##  Condition in MACSYMA-TOP-LEVEL [or a callee]: INTERNAL-SIMPLE-UNDEFINED-FUNCTION: Cell error on ^RULE1: Undefined function: 
## Automatically continuing.
## To enable the Lisp debugger set *debugger-hook* to nil.
## "/var/www/html/LANG/TMP/tmp_lang/chunk-11.mxl"

関数 on3evdef() : on3(var,vl,vr,lr)に変数,文字定数が存在する場合の評価を行う

on3evdef()$
on3evdef('ex)$
## ~/bin/go TMP/tmp_lang/chunk-12.mxl  > TMP/tmp_lang/chunk-12.out 2>&1
## batch("/var/www/html/LANG/TMP/tmp_lang/chunk-12.mxl")
## read and interpret /var/www/html/LANG/TMP/tmp_lang/chunk-12.mxl
## on3evdef()
##    --begin of on3evdef('help)--
##    機能: on3(var,vl,vr,lr)関数に変数,文字定数が存在する場合の評価を行う
##    文法: on3evdef(on3func,...)
##    例示: on3evdef(on3(x,a,a+2,co)) -> on3(x,a,a+2,co)
##          on3evdef(on3(a,a,a+2,co)) -> 1
##    --end of on3evdef('help')--
##    
## on3evdef('ex)
## --begin of on3evdef('ex)-- 
## Maxima encountered a Lisp error:
##  Condition in MACSYMA-TOP-LEVEL [or a callee]: INTERNAL-SIMPLE-UNDEFINED-FUNCTION: Cell error on ^RULE1: Undefined function: 
## Automatically continuing.
## To enable the Lisp debugger set *debugger-hook* to nil.
## "/var/www/html/LANG/TMP/tmp_lang/chunk-12.mxl"

関数 funcs(), findstr() :ユーザ定義の関数,マクロから指定文字列を含む関数(マクロ)名を検索する

funcs()$
funcs('ex)$
findstr()$
findstr('ex)$
## ~/bin/go TMP/tmp_lang/chunk-13.mxl  > TMP/tmp_lang/chunk-13.out 2>&1
## batch("/var/www/html/LANG/TMP/tmp_lang/chunk-13.mxl")
## read and interpret /var/www/html/LANG/TMP/tmp_lang/chunk-13.mxl
## funcs()
##   ==ユーザ定義の関数名,マクロ名一覧:  functions , sortmode= true == 
## ["ON3on3([args])","acnode_join(LWT0,[args])","args_flat([args])","ass_set([args])",
##  "chk1g([args])","chk1show([args])","chk2D([args])","chk2g([args])","chk2show([args])",
##  "chk3g([args])","debug_ex(x,[args])","debug_sub(y,[args])","ecsort([args])",
##  "elimalg1([args])","elimalg1_ex([args])","exchk(on3func_name,exansL,[args])",
##  "exchk_ex([args])","exmk(ex,[args])","exmk_ex([args])","exp2l([args])","extry([args])",
##  "f2l([args])","f2l_full([args])","f2l_one([args])","fact_forget([args])",
##  "fact_var([args])","find_key([args])","find_key_ex([args])","find_key_no([args])",
##  "find_key_no_ex([args])","findstr([args])","findstr_ex([args])","floatfix([args])",
##  "floatfix_ex([args])","flrlimit([args])","flrlimit_ex([args])","fna([args])",
##  "funcs([args])","funcxy([args])","funcxy_ex([args])","gcd2l([args])",
##  "globalvar([args])","gr2v([args])","gr2v_ex([args])","gr2vf([args])","gr3v([args])",
##  "gr3v_ex([args])","grv([args])","grv_ex([args])","ineqex([args])","jumppoints([args])",
##  "killvars([args])","l2f([args])","l2f_one([args])","list2str([args])",
##  "list2str_ex([args])","ll2on3(varl,va,LL,[args])","loffuncs([args])","logshow([args])",
##  "lpup([args])","mergeL([args])","mergeL_ex([args])","mk_draw([args])",
##  "mk_draw_ex([args])","mk_fullname([args])","mk_yrange([args])","mkfloat([args])",
##  "mkfloat_ex([args])","msort([args])","msort_ex()","nor2d([args])","on3([args])",
##  "on3D2G([args])","on3D2G_ex([args])","on3_same_var([args])","on3asdecomp([args])",
##  "on3asdecomp_ex([args])","on3byon3([args])","on3chgv([args])","on3chgvar2([args])",
##  "on3chgvar2_ex([args])","on3chgvar2_test()","on3chgvar3([args])",
##  "on3cspline(tab,[select])","on3cspline_ex([args])","on3decomp([args])",
##  "on3decomp21([args])","on3decomp_decomp(expr,[args])","on3decomp_ex([args])",
##  "on3decomp_inv(u,[args])","on3decomp_one([args])","on3decomp_reduce(LWT0,[args])",
##  "on3decompm([args])","on3diff([args])","on3diff_ex([args])","on3dim2_exp2([args])",
##  "on3dim2_uni2([args])","on3dplot2([args])","on3edge([args])","on3edge_ex([args])",
##  "on3ev([args])","on3evdef([args])","on3ex([args])","on3factor([args])",
##  "on3find([args])","on3find_ex([args])","on3ftrue([args])","on3funcdraw([args])",
##  "on3gr([args])","on3gr2([args])","on3gr_ex([args])","on3help()","on3iftrue([args])",
##  "on3ineq([args])","on3ineq_acnode(LF,[args])","on3ineq_backsolve(LF,[args])",
##  "on3ineq_fwd(varl,va,vlist,vsing,[args])","on3ineq_jex([args])",
##  "on3ineq_shrink([args])","on3info([args])","on3integ([args])","on3integ10([args])",
##  "on3integ19([args])","on3integ19_ex([args])","on3integ20([args])",
##  "on3integ20_ex([args])","on3integ_ex([args])","on3lrl([args])",
##  "on3lspline(tab,[select])","on3lspline_ex([args])","on3pw_ex()","on3regionview([args])",
##  "on3rngm([args])","on3rngm_ex1([args])","on3rngm_ex2([args])","on3rngone(rng1,rng2)",
##  "on3romberg([args])","on3show_ex([args])","on3show_sub(funcs,[args])","on3simp([args])",
##  "on3solve([args])","on3solve_ex([args])","on3std([args])","on3std_ex([args])",
##  "on3termsep([args])","on3test([args])","on3typep([args])","on3varfix([args])",
##  "on3vars([args])","on3x([args])","outLev([args])","p2surface([args])","polydeg([args])",
##  "q3([args])","q4([args])","realp([args])","salgall([args])","salgall_ex([args])",
##  "shrink10(LYLR,[args])","slit([args])","sqrt2d([args])","sqrt2d_ex([args])",
##  "ush([args])","va_unique([args])","var_fact([args])"]
##   
##   ==ユーザ定義の関数名,マクロ名一覧:  macros , sortmode= true == 
## ["c0show([lis])","c1show([lis])","c2show([lis])","c3show([lis])","cashow([lis])",
##  "cshow([lis])","d1show([lis])","d2show([lis])","d3show([lis])","ifargd()",
##  "max_restore([args])","max_save([args])","on3env([args])","on3lib([args])",
##  "on3rules([args])","on3show([args])"]
##   
## funcs('ex)
## --begin of funcs('ex)-- 
##     ev(str) = funcs('show) 
## --end of funcs('ex)-- 
## findstr()
##    --begin of findstr('help)--
##    機能: ユーザ定義の関数,マクロから指定文字列を含む関数(マクロ)名を検索する
##    文法: findstr(str)
##    例示: findstr('solve)
##    --end of findstr('help')--
##    
## findstr('ex)
## --begin of func1('ex)-- 
## ★  
##     ( findstr('solve),  /* 文字列solve を含む関数名,マクロ名を標示する */ 
##      
##     
##    findstr('decomp), /* 文字列decomp を含む関数名,マクロ名を標示する */ 
##     
##     findstr('show)   /* 文字列show を含む関数名,マクロ名を標示する */  
##      ) 
## <findstr> search string = solve 
## <findstr> functions --> 
##          ["on3solve([args])","on3solve_ex([args])","on3ineq_backsolve(LF,[args])"] 
## <findstr> macros --> [] 
## <findstr> search string = decomp 
## <findstr> functions --> 
##          ["on3decomp_reduce(LWT0,[args])","on3decomp_decomp(expr,[args])",
##           "on3decomp_inv(u,[args])","on3decomp_one([args])","on3asdecomp([args])",
##           "on3asdecomp_ex([args])","on3decompm([args])","on3decomp21([args])",
##           "on3decomp([args])","on3decomp_ex([args])"] 
## <findstr> macros --> [] 
## <findstr> search string = show 
## <findstr> functions --> 
##          ["chk2show([args])","on3show_sub(funcs,[args])","on3show_ex([args])",
##           "logshow([args])","chk1show([args])"] 
## <findstr> macros --> 
##          ["on3show([args])","cashow([lis])","c0show([lis])","cshow([lis])",
##           "c1show([lis])","c2show([lis])","c3show([lis])","d1show([lis])",
##           "d2show([lis])","d3show([lis])"] 
##     out =  --- end of findstr --- 
## --end of findstr('ex)-- 
## "/var/www/html/LANG/TMP/tmp_lang/chunk-13.mxl"

終わり