1-3) Computes the complex arc tangent of z with branch cuts outside the interval [−i,+i] along the imaginary axis.

4) Type-generic macro: If z has type longdoublecomplex, catanl is called. if z has type doublecomplex, catan is called, if z has type floatcomplex, catanf is called. If z is real or integer, then the macro invokes the corresponding real function (atanf, atan, atanl). If z is imaginary, then the macro invokes the corresponding real version of the function atanh, implementing the formula atan(iy) = i atanh(y), and the return type of the macro is imaginary.

Inverse tangent (or arc tangent) is a multivalued function and requires a branch cut on the complex plane. The branch cut is conventionally placed at the line segments (-∞i,-i) and (+i,+∞i) of the imaginary axis.

The mathematical definition of the principal value of inverse tangent is atan z = -