Circular

, or Circle Function, is a dyadic scalar function, which is essentially a collection of related monadic functions. Circular encompasses trigonometric functions, hyperbolic functions, and a few relationships between them. On some implementations with complex numbers, Circular also includes functions to decompose and assemble a complex number. It shares the glyph  with the monadic arithmetic function Pi Times.

Examples
Most APL implementations agree on the following functions:

The following shows the values of sine, cosine, and tangent at $$0, \frac{\pi}{2}, \pi$$. Note that zeros are not exact and $$\tan{\frac{\pi}{2}}$$ does not signal DOMAIN ERROR because of limited precision of $$\pi$$.

and /  reflect the identities $$\sin^2{Y} + \cos^2{Y} = 1$$ and $$\cosh^2{Y} - \sinh^2{Y} = 1$$ respectively. In APL code,  is equivalent to   and ,   is equivalent to  , and   is equivalent to.

On implementations with complex number support,  is modified to $$(Y+1)\sqrt{\frac{Y-1}{Y+1}}$$ so that it agrees with   for complex numbers.

As a mnemonic, the functions for even X are even functions, and those for odd X are odd functions. Also,  and   are inverses of each other.

Functions added with complex number support
Extensions with complex numbers are as follows:

The left arguments 9 and 11 extract the real and imaginary parts (the Cartesian coordinates on the complex plane), while 10 and 12 extract the magnitude and angle (the polar coordinates). The negative counterparts can be used to assemble the Cartesian or polar coordinates back to a single complex number.

J has separate built-in functions for these operations: Real/Imag  (Cartesian decomposition), Length/Angle   (polar decomposition), Complex   (Cartesian assembly), and Polar   (polar assembly). Note that, unlike the APL version above,  and   create a trailing axis of length 2.

Documentation

 * Dyalog
 * APLX
 * J Dictionary, NuVoc