Roger Hui wrote:
> 
> 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
> 
> 


Also:

(*+)@[EMAIL PROTECTED]


-- 
View this message in context: 
http://www.nabble.com/Re%3A-moo-%28Pythagoras%29-tp18910779s24193p18928520.html
Sent from the J Programming mailing list archive at Nabble.com.

----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to