[BACK]Return to plain.sm1 CVS log [TXT][DIR] Up to [local] / OpenXM / src / kan96xx / Kan

Annotation of OpenXM/src/kan96xx/Kan/plain.sm1, Revision 1.1.1.1

1.1       maekawa     1: /= { set } def
                      2: /+ { add } def
                      3: /- { sub } def
                      4: /* { mul } def
                      5:
                      6: /<< {  } def
                      7: />> {  } def
                      8:
                      9: /toArray { %% f1 ... fn n toArray [f1 ... fn]
                     10:   [ 2 1 roll %% f1 ... fn [ n
                     11:   1 add 1 roll %% [ f1 ... fn
                     12:   ]
                     13: } def
                     14:
                     15: /rotate_n {
                     16:   -1 roll
                     17: } def
                     18:
                     19: /decompose {
                     20:   aload length
                     21: } def
                     22: /n 0 def /com 0 def /i 0 def /ar 0 def /res 0 def
                     23:
                     24:
                     25: /ring_of_difference_operator { %% ${x,y}$ ring_of_difference_operator
                     26:   /arg1 =
                     27:   /vars arg1 def
                     28:   ${}$  % first arg
                     29:   vars to_records /@e.n = $ee$
                     30:   @e.n 1 + toArray /vars = % vars = [$x$ $y$ $ee$]
                     31:   @e.n 1 + /@e.n =            % @e.n    =  3
                     32:   ${$ vars {$,$ 2 cat_n} map % [$x,$ $y,$ $ee,$]
                     33:   decompose pop  % $x,$ $y,$ $ee,$
                     34:   vars {$E$ 2 rotate_n $,$ 3 cat_n} map
                     35:   decompose pop pop $eeE$ $}$
                     36:   @e.n 2 * 2 + cat_n  % the second arg
                     37:   ${}$ %% the third arg
                     38:   ${ee}$ $MED$ ${}$
                     39: } def
                     40:

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>