Another way to get to Bill's version (apply the functions from right to left).
f=: 13 :'%+/%y' f 2 4 1.33333 f [: % [: +/ % f 2 4 5 1.05263 Linda -----Original Message----- From: [email protected] [mailto:[email protected]] On Behalf Of bill lam Sent: Saturday, October 13, 2012 7:04 PM To: [email protected] Subject: Re: [Jprogramming] another example of 'under' try %@(+/)@:% or in explicit form 3 : '% +/ % y' untested. Сбт, 13 Окт 2012, Keith Park писал(а): > To find the value of resistors in parallel one takes the reciprocal of > the sum of the reciprocals. So I would like to write a verb to do > just that. *pr=:%+/% > *But that, of course, doesn't work. So my question is "is there a > way of avoiding unwanted hooks and forks?" > > On Fri, Oct 5, 2012 at 8:20 AM, Keith Park <[email protected]> wrote: > > > Thanks! > > > > > > On Thu, Oct 4, 2012 at 10:14 PM, Raul Miller <[email protected]>wrote: > > > >> In the sentence: > >> > >> +/&.:% resistances > >> > >> the phrase +/&.:% is a verb which finds parallel resistance. > >> > >> -- > >> Raul > >> > >> On Thu, Oct 4, 2012 at 9:19 PM, Keith Park <[email protected]> wrote: > >> > To parallel a number of resistors the expression * %+/% *does the job. > >> > How could one make an equivalent verb? > >> > > >> > On Wed, Sep 26, 2012 at 12:38 PM, Boyko Bantchev > >> > <[email protected]> > >> wrote: > >> > > >> >> On 26 September 2012 15:39, Henry Rich <[email protected]> wrote: > >> >> > +&.% is the operation for combining parallel electrical > >> >> > +resistances, > >> >> another > >> >> > example that immediately demonstrates the associativity. > >> >> > >> >> Indeed! I had the vague feeling I know this formula from > >> >> somewhere else but it evaded me where. > >> >> > >> >> > (w:h) ................. > >> >> > >> >> The above is a mistake, of course. I should have said h:w, or > >> >> place rectangles one above the other instead. > >> >> ---------------------------------------------------------------- > >> >> ------ For information about J forums see > >> >> http://www.jsoftware.com/forums.htm > >> >> > >> > ----------------------------------------------------------------- > >> > ----- For information about J forums see > >> > http://www.jsoftware.com/forums.htm > >> ------------------------------------------------------------------- > >> --- For information about J forums see > >> http://www.jsoftware.com/forums.htm > >> > > > > > ---------------------------------------------------------------------- > For information about J forums see http://www.jsoftware.com/forums.htm -- regards, ==================================================== GPG key 1024D/4434BAB3 2008-08-24 gpg --keyserver subkeys.pgp.net --recv-keys 4434BAB3 ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm
