I'd write it tacitly like this: (+/@(*/)@(,: 1&|.) % */) a b c
This is mainly motivated by the fact that a * b + b* c + c*a can be expressed as multiplying with a shifted version, then summing. Jan-Pieter 2013/10/30 Raul Miller <[email protected]> > On Wed, Oct 30, 2013 at 2:51 AM, Don Kelly <[email protected]> wrote: > > > You are right but it is a bit of serendipity What I wanted is (a*b+ > > b*c+c*a ) % c a b . > > it doesn't matter how the pairs are formed in the numerator ac+ba+cb is > > the same. > > > > Like this? > > F=: +/ .* (</~i.3) +/ .* ] % */ > > That's probably awful for speed, but it does express the idea. > > Thanks, > > -- > Raul > ---------------------------------------------------------------------- > For information about J forums see http://www.jsoftware.com/forums.htm > ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm
