The issue becomes - are we writing scripts/libraries to showcase J to beginners or to provide performant utilities for users? The tacit formulation of the same algorithm is twice as fast and 3 times leaner (and I'm sure could be improved). The original version was written to make it similar to the So if we were to include a version in a script which should it be? Should we have two scripts, one for beginners & another for normal use?
getang_cosrule=. dfr@arccos@(+:@(*/)@}: %~ +/@:*:@}: - *:@{:) getlen_cosrule=. %:@(+/@:*:@] - 2 * cos@rfd@[ * */@]) cosrule=: getang_cosrule : getlen_cosrule f. IMO if user scratch their itches (build stuff they are interested in) and share the result with the community. If it is of use to you then it will probably be of use to (some) others too. Of course that doesn't mean community contributions couldn't be better organized or curated. On Sun, Dec 2, 2012 at 6:43 PM, Alex Giannakopoulos <aeg...@blueyonder.co.uk > wrote: > > Love the cos rule suggestion by the way Ric, THAT'S what I'm on about, > that's the way to showxase J for beginners! > > Should be included in the math/misc/trig file. (At the moment it only has > the most basic of stuff, function redefinitions and some dfr-rfd stuff - > hardly a beginners trig library.) > ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm