Since there are several interesting modulo operations, it's probably useful to have a conjunction rather than an adverb. e.g.
= mod n + mod n - mod n * mod n % mod n ^ mod n The monad % mod n y is multiplicative inverse, the dyad is x * mod n % mod n y . To implement the monad, see http://www.jsoftware.com/jwiki/Essays/Euclidean_Algorithm To implement x ^ mod n y, see http://www.jsoftware.com/jwiki/Essays/Multiplicative_Order ----- Original Message ----- From: [EMAIL PROTECTED] Date: Sunday, May 25, 2008 14:30 Subject: Re: [Jprogramming] modular equality To: [email protected] > Raul Miller wrote: > >Personally, I would express this in J as > > 38 =&(12&|) 14 > > And I would factor the "12" out to get a flexable ad-noun. This > is easy to do given Raul's tacit expression above: > > meq =. =&(&|) > 38 (12 meq) 14 15 > 1 0 ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm
