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