○ — Cis / Circular

Function. Keys: Alt-o. Hanzi: 圆 (圓). Ranks: 0 monadic, 0 0 dyadic

○Y: Real Y is an angle in radians. Pervasive.

○0                ⍝ 1
○0j1              ⍝ *¯1

K○Y applies the circular function with code K, from 0 to 8. K○⁻Y applies its inverse. Pervasive; angles in radians.

1○0               ⍝ 0
2○0               ⍝ 1
1○⁻1             ⍝ 1.5707963267948966
kk○yk○⁻y
0√(1−y²)√(1−y²)
1sinarcsin
2cosarccos
3tanarctan
4√(1+y²)APL branch of √(y²−1)
5sinharcsinh
6cosharccosh
7tanharctanh
8√(-1−y²)-√(-1−y²)

Uses complex continuation where needed. The cuts of 3○⁻ and 5○⁻ lie on the imaginary axis. In 3○⁻ 0j2 and 3○⁻ ¯0j2, the sign of the zero real part picks the side of the cut. Zero's sign is not guaranteed. Under dynamic kinds, the literal 2j¯0 is read as real 2. A real argument is treated as having an imaginary part of +0:

1○⁻2              ⍝ 1.5707963267948966j1.3169578969248166

APL difference: there are no negative codes or codes 9 to 12. Write ¯k○Y as k○⁻Y. ∨Y gives the real and imaginary parts, |Y the magnitude, and ∧Y the magnitude and phase. On a branch cut, APL takes the side below the cut for a positive real argument.

Inverse

○⁻Y gives the angle of the unit complex number Y. The table above gives the inverse of each K○.

○⁻0j1   ⍝ π0.5