view test/g631.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
line wrap: on
line source

NB. u&.v ----------------------------------------------------------------

12 _12 _12 12 = 3 3 _3 _3 +&.^. 4 _4 4 _4
7 _1 1 _7     = 3 3 _3 _3 *&.^  4 _4 4 _4

1 -: +&.^./''
0 -: *&.^ /''

totient =. * -.@%@~.&.q:
t1      =. 1: #. 1: = (+.i.)
(t1 -: totient)"0 x=.>:?2 10$1000


NB. f&.> ----------------------------------------------------------------

(100$<1) -: #&.>?100$1000
(,&.>6 1 4 4) = $&.>;:'Cogito, ergo sum.'

(<"0 (>x)+ >y) -: x  +&.>y [ x=.   ?1000     [ y=.   ?1000
(<"0 (>x)>.>y) -: x >.&.>y [ x=.   ?1000     [ y=.<"0?1000
(<"0 (>x)* >y) -: x * &.>y [ x=.<"0?1000     [ y=.   ?1000
(<"0 (>x)* >y) -: x * &.>y [ x=.<"0?1000     [ y=.<"0?1000

(<"0 (>x)+ >y) -: x  +&.>y [ x=.   ?1000     [ y=.   ?100$1000
(<"0 (>x)>.>y) -: x >.&.>y [ x=.   ?1000     [ y=.<"0?100$1000
(<"0 (>x)* >y) -: x * &.>y [ x=.<"0?1000     [ y=.   ?100$1000
(<"0 (>x)* >y) -: x * &.>y [ x=.<"0?1000     [ y=.<"0?100$1000
                                                         
(<"0 (>x)+ >y) -: x  +&.>y [ x=.   ?100$1000 [ y=.   ?1000
(<"0 (>x)>.>y) -: x >.&.>y [ x=.   ?100$1000 [ y=.<"0?1000
(<"0 (>x)* >y) -: x * &.>y [ x=.<"0?100$1000 [ y=.   ?1000
(<"0 (>x)* >y) -: x * &.>y [ x=.<"0?100$1000 [ y=.<"0?1000

(<"0 (>x)+ >y) -: x  +&.>y [ x=.   ?100$1000 [ y=.   ?100$1000
(<"0 (>x)>.>y) -: x >.&.>y [ x=.   ?100$1000 [ y=.<"0?100$1000
(<"0 (>x)* >y) -: x * &.>y [ x=.<"0?100$1000 [ y=.   ?100$1000
(<"0 (>x)* >y) -: x * &.>y [ x=.<"0?100$1000 [ y=.<"0?100$1000

'length error' -: (i.12)  +&.> etx i.3 4
'length error' -: (i.3 4) +&.> etx i.4 3

4!:55 ;:'t1 totient x y '