Some alternative statements of the same expression are shorter and neater, without using the n v v construct:
*:@sin + *:@cos sin +&*: cos ----- Original Message ----- From: david alis <[EMAIL PROTECTED]> Date: Saturday, August 9, 2008 21:39 Subject: [Jprogramming] Re: moo (Pythagoras) To: Programming forum <[email protected]> > The item relating to "N0 V1 V2 Implemented" > http://www.jsoftware.com/help/release/nvv.htm > contains an identity from maths. > > A formulation that reminds me of my schooldays is: > Sin =: 1 o. ] > Cos =: 2 o. ] > Pythagoras =: (2 ^~ Sin) + (2 ^~ Cos) > > +sample =: 5 [EMAIL PROTECTED] > 0.674048 0.667342 0.930836 0.880495 0.719577 > Pythagoras sample > 1 1 1 1 1 > +sample =: 5 [EMAIL PROTECTED] > 83 60 97 75 88 > Pythagoras sample > 1 1 1 1 1 ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm
