Thanks. I was actually wrong, my memory failed me, cos d.1 did not produce an error, but didn't get evaluated. Also it seems I got my cos and sin mixed up. Doing cos d. 1 did not produce an error,but it didn't produce a result.
i.e. cos d. 1 cos d.1 NB. this is the result. It didn't evaluate the expression. Using cos f. d. 1 did work however. Thanks. > From: [email protected] > Date: Tue, 12 Aug 2014 10:46:00 -0400 > To: [email protected] > Subject: Re: [Jprogramming] Verb output to string conversion. > > On Tue, Aug 12, 2014 at 8:57 AM, Jon Hough <[email protected]> wrote: > > I was hoping I could use an alias name for the primitives and get the > > derivative of those. > > e.g. cos =: 1&o.sin =: 2&o.cos d. 1 > > This produces an error, but it would have been nice if I could get it to > > return - sin. > > cos=: 2&o. > sin=: 1&o. > cos f. d. 1 > -@(1&o.) > sin f. d. 1 > 2&o. > > Note that it still works without f. but it looks different that way. > > 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
