asec computes the element-wise inverse secant of the argument.

## Syntax

    y = asec(x)

## Arguments

x

  a real or complex array.

y

  a real or complex array.

## Description

Computes the element-wise inverse secant of the argument. For real argument with absolute value greater than 1 the result is real.

The following equalities hold: `asec(z) == -acsc(-z) == asin(1/z) == %pi/2-asec(x) == %i*acsch(%i*z)`.

## Sample

x=linspace(1,20,200); x=[-x($:-1:1) %nan x]; plot(x,asec(x))

## Examples

    x=[1 2 -2 sqrt(2) -sqrt(2) 2/sqrt(3) -2/sqrt(3) -1];
    asec(x)/%pi

## See also

- sec
- asecd

## References

- Kahan, W., "Branch cuts for complex elementary functions, or, Much ado about nothing's sign bit", Proceedings of the joing IMA/SIAM conference on The State of the Art in Numerical Analysis, University of Birmingham, A. Iserles and M.J.D. Powell, eds, Clarendon Press, Oxford, 1987, 165-210.