> whether you think of zero and one as numbers > or as boolean values.
0 and 1 are numbers; boolean values are numbers. This is one of the tremendous innovations in APL/J so taken for granted that it's usually not thought of as an innovation, but some people noticed. See: http://arxiv.org/PS_cache/math/pdf/9205/9205211v1.pdf http://keiapl.org/anec/#implementers2 http://keiapl.org/anec/#Maple ----- Original Message ----- From: Devon McCormick <[email protected]> Date: Wednesday, March 4, 2009 8:30 Subject: Re: [Jprogramming] LCM and GCD To: Programming forum <[email protected]> > A simple way to think about it is that "or" is based on "plus" > which gives > you smaller results than "times" just as "GCD" will tend to be > smaller than > "LCM". > > More importantly, what is the GCD versus the LCM for boolean > arguments? The > result tables are the same as "or" and "and", > respectively. This gives you > consistent results whether you think of zero and one as numbers > or as > boolean values. > > On Wed, Mar 4, 2009 at 10:55 AM, Simon Jackson > <[email protected]> wrote: > > > Hi just been reading the num denom posts, and just wondered > why the > > LCM and GCD had the associations of and and or. > > > > I would have thought that if a factor is considered as an item > bit, then > > > > OR = LCM > > AND = GCD > > XOR = LCM/GCD > > > > The way that and = LCM and or = GCD is slightly counter > intuitive for > > me, what is the reason for this choice? > > > > cheers confused jacko ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm
