○ — Cis / Circular
Function. Keys: Alt-o. Hanzi: 圆 (圓). Ranks: 0 monadic, 0 0 dyadic
○Y: eiY = cos Y + i sin Y. Real Y is an angle in radians. Pervasive.
○0 ⍝ 1
○0j1 ⍝ *¯1K○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.5707963267948966k |
k○y |
k○⁻y |
|---|---|---|
| 0 | √(1−y²) |
√(1−y²) |
| 1 | sin | arcsin |
| 2 | cos | arccos |
| 3 | tan | arctan |
| 4 | √(1+y²) |
APL branch of √(y²−1) |
| 5 | sinh | arcsinh |
| 6 | cosh | arccosh |
| 7 | tanh | arctanh |
| 8 | √(-1−y²) |
-√(-1−y²) |
Uses complex continuation where needed. The cuts of 3○⁻ and 5○⁻ lie on the imaginary axis. The signed real zeros in 3○⁻ 0j2 and 3○⁻ ¯0j2 distinguish the two sides. Zero’s sign is not guaranteed. Under dynamic kinds, the literal 2j¯0 is read as real 2. A real argument computes with an imaginary part of +0:
1○⁻2 ⍝ 1.5707963267948966j1.3169578969248166APL 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