Or you could do:

cot=: %@(tan=: 3&o.)
sec=: %@(cos=: 2&o.)
csc=: %@(sin=: 1&o.)

Thanks,

-- 
Raul


On Tue, Aug 15, 2017 at 1:11 PM, Jimmy Gauvin <[email protected]> wrote:
> Hi,
>
> problem is with 4 5 6 which denote the following:
>
>    coh=: 4&o.        NB. sqrt (1+(y^2))
>    sinh=: 5&o.       NB. hyperbolic sine of y
>    cosh=: 6&o.       NB. hyperbolic cosine of y
>
> see: http://code.jsoftware.com/wiki/Vocabulary/odot#dyadic
>
> There dosen't seem to be specific numbers for cot, sec and csc.
> You have to go by their definition:
>
> [image: \cot \theta ={\frac {\cos \theta }{\sin \theta }}=\tan \left({\frac
> {\pi }{2}}-\theta \right)={\frac {1}{\tan \theta }}]
>
> [image: \sec \theta =\csc \left({\frac {\pi }{2}}-\theta \right)={\frac
> {1}{\cos \theta }}]
>
> [image: \csc \theta =\sec \left({\frac {\pi }{2}}-\theta \right)={\frac
> {1}{\sin \theta }}]
>
>
>
> On Tue, Aug 15, 2017 at 12:41 PM, Linda Alvord <[email protected]>
> wrote:
>
>>
>>
>> Sent from AOL Mobile Mail
>>
>>
>> From: Linda Alvord <[email protected]>
>> Date: Tuesday, August 15, 2017
>> Subject: FW: why are there no negative signs for cot,sec and csc?
>> Cc: lindaalvord <[email protected]>
>>
>> 
>>
>>
>>
>>
>>
>>
>>
>> From: Linda Alvord [mailto:[email protected]]
>> Sent: Tuesday, August 15, 2017 11:22 AM
>> To: '[email protected]' <[email protected]>
>> Subject: why are there no negative signs for cot,sec and csc?
>>
>>
>>
>> do=: 13 : '({.y) +(i.{:y)*(--/ 2{.y)%<:{:y'
>>
>> t=:do 0 2p1 17
>>
>> all=:1 2 3 4 5 6 (o."0 1) t
>>
>> *all
>>
>> 0 1 1 1 1 1 1 1 0 _1 _1 _1 _1 _1 _1 _1 0
>>
>> 1 1 1 1 0 _1 _1 _1 _1 _1 _1 _1 0 1 1 1 1
>>
>> 0 1 1 1 1 _1 _1 _1 0 1 1 1 1 _1 _1 _1 0
>>
>> 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
>>
>> 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
>>
>> 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
>>
>>
>>
>> Linda
>>
>> ----------------------------------------------------------------------
>> 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

Reply via email to