x gcd y is <./&.(_&q:) x,y x lcm y is >./&.(_&q:) x,y
lcm % gcd is (>.-<.)/&.(_&q:) lcm * gcd is (>.+<.)/&.(_&q:) , which equals +/&.(_&q:) which is just * ----- Original Message ----- From: Oleg Kobchenko <[email protected]> Date: Tuesday, February 3, 2009 10:32 Subject: Re: [Jprogramming] Examples of dyadic forks To: Programming forum <[email protected]> > > From: John Randall <[email protected]> > > > > Thanks to all, especially Roger, for the dyadic fork examples. > > > > I regard the tautologies as a bit meta, but I do like >. - > <. . I had a > > more complicated example along the same lines. > > > > Before posing the question, I followed Oleg's advice in that I > eyeballed> the dyads in J Phrases: almost all use [ ] @ @: or > constant functions. > > Also > > GCD * LCM is (*. * +.) tautology * > > > I don't know what LCM % GCD is, but it is always whole > and has some pattern > > load'viewmat' > viewmat (*. % +.)"0/~ 2+i.100 > viewmat | (*. % +.)"0/~ 2+i:50 > viewmat |%:(*. % +.)"0/~ 2+i.100 ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm
