# asec() Function & Examples

Use the asec() trigonometry function in Calcul.io. Review its syntax, edit working examples, understand the result, and explore related math functions.

## asec

#### asec(x)

Try it yourself:

```calculio
asec(0.5)
asec(sec(0.5))
asec(2)
```

[acos](https://calcul.io/function/acos/index.md)

[acot](https://calcul.io/function/acot/index.md)

[acsc](https://calcul.io/function/acsc/index.md)

---

## asec(): Finding an Angle from a Secant

**asec()** returns a principal angle whose secant is the supplied value. Secant is the reciprocal of [cos()](https://calcul.io/function/cos/index.md), so asec is useful when a formula gives a reciprocal cosine ratio directly.

## Domain and branch choice

For a real result, the input must have magnitude at least one: x ≤ −1 or x ≥ 1. Zero is impossible because secant is never zero. asec returns one conventional representative even though secant repeats, so its result should be interpreted as a principal value rather than every solution.

The relationship asec(x) = acos(1/x) is useful for intuition and checking. However, dividing by a small value is unstable and x must not be zero. Use [abs()](https://calcul.io/function/abs/index.md) to validate magnitude, and use [acos()](https://calcul.io/function/acos/index.md) when your quantity is already a cosine rather than a secant.

## Applications and verification

Reciprocal trigonometric functions appear in integrals, geometry, and some engineering formulas. Verify a valid calculation by applying [sec()](https://calcul.io/function/sec/index.md) to the result. Keep all angles in radians while calculating.

If a direction comes from two coordinates, [atan2()](https://calcul.io/function/atan2/index.md) is often more robust because it preserves the quadrant without reciprocal conversion. Choose asec when secant is genuinely the known measurement.

[All functions](https://calcul.io/functions/index.md)
