comparison test/gsp221.ijs @ 0:e0bbaa717f41 draft default tip

lol J
author Jordi Gutiérrez Hermoso <jordigh@octave.org>
date Mon, 25 Nov 2013 11:56:30 -0500
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:e0bbaa717f41
1 NB. ~. ------------------------------------------------------------------
2
3 f=: 3 : '(scheck t) *. (~.p) -: t=: ~.s=: (2;y)$.p'
4
5 c=: ; (i.1+r) <"1@comb&.>r=: 4
6 f&> c [ p=: (?200$100) { (?100 4 5$2) * ? 100 4 5 3$2
7 f&> c [ p=: (?200$100) { (?100 4 5$2) * ? 100 4 5 3$100
8 f&> c [ p=: (?100$ 50) { (? 50 4 5$2) * o. ? 50 4 5 3$100
9 f&> c [ p=: (?100$ 50) { (? 50 4 5$2) * j./?2 50 4 5 3$100
10
11 c=: ; (i.1+r) <"1@comb&.>r=: 3
12 f&> c [ p=: ?100 4 5$1000
13 f&> c [ p=: 0 (0)} ?100 4 5$1000
14 f&> c [ p=: 0 (9)} ?100 4 5$1000
15 f&> c [ p=: 0 * ?100 4 5$1000
16 f&> c [ p=: (?200$100) { ?100 4 5$1000
17 f&> c [ p=: (?200$100) {(?100 4$2) * ?100 4 5$1000
18
19 (~.$.p) -: ~.p=: i.0
20 (~.$.p) -: ~.p=: i.0 5
21 (~.$.p) -: ~.p=: i.5 0
22
23 p=: ?100$1e9
24 q=: (?100$20){?20 5$10
25 s=: q p}1 $. 1e9 5 ; 0 ; 2-2
26 t=: ~.s
27 scheck t
28 ($t) -: $~.0,q
29 (2$.t) -: ,0
30 (3$.t) -: 0
31 (4$.t) -: ,. (i.#t)-.{.(i.1+#p) -. p
32 (5$.t) -: ~.q/:p
33
34
35 4!:55 ;:'c f p q r s t'