> ## Documentation Index
> Fetch the complete documentation index at: https://docs.truemath.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Trigonometry

> Trigonometric, inverse, and hyperbolic functions, including how angle units are interpreted.

These functions take an angle and return a ratio, or take a ratio and return an angle. Each accepts a number or a [table](https://docs.truemath.ai/math/types/tables.md), returning the same shape.

## Angle units

A bare number is interpreted as **degrees**. Attach an angle [unit](https://docs.truemath.ai/math/units.md) to be explicit:

* `value` — degrees (the default)
* `value deg` — degrees
* `value rad` — radians

The inverse functions return their result in **degrees**. To read one in radians, [cast](https://docs.truemath.ai/math/units.md#casting-to-a-specific-unit) the result — `(asin(0.5))rad`. A unit on the *argument* of an inverse function is an error, since the argument is a dimensionless ratio.

## Sine, cosine, and tangent \[sin, cos, tan]

```
sin(value)
cos(value)
tan(value)
```

The sine, cosine, and tangent of an angle.

*Angles use the shared [angle units](#angle-units) — degrees unless you append `rad`.*

```
sin(45deg)       => 0.7071
sin((pi/4)rad)   => 0.7071
cos(60)          => 0.5
tan(45)          => 1
```

## Secant, cosecant, and cotangent \[sec, csc, cot]

```
sec(value)
csc(value)
cot(value)
```

The secant, cosecant, and cotangent of an angle — the reciprocals of cosine, sine, and tangent.

*Angles use the shared [angle units](#angle-units) — degrees unless you append `rad`.*

```
sec(60)   => 2
csc(30)   => 2
cot(45)   => 1
```

## Inverse functions \[asin, acos, atan]

```
asin(value)
acos(value)
atan(value)
```

The arc-sine, arc-cosine, and arc-tangent. `asin` and `acos` take a dimensionless ratio between -1 and 1; `atan` takes any dimensionless ratio. All three return an angle in degrees.

*Angles use the shared [angle units](#angle-units) — degrees unless you append `rad`.*

```
asin(0.5)        => 30 deg
acos(1)          => 0 deg
atan(1)          => 45 deg
(asin(0.5))rad   => 0.5236 rad
```

## Hyperbolic functions \[sinh, cosh, tanh, asinh, acosh, atanh]

```
sinh(value)
cosh(value)
tanh(value)

asinh(value)
acosh(value)
atanh(value)
```

The hyperbolic sine, cosine, and tangent, and their inverses. **These read their argument as an angle too**, on the same [angle units](#angle-units) as the circular functions — so `sinh(1)` is the hyperbolic sine of one *degree*. Write `sinh(1rad)` for the value usually written as sinh(1). The inverses return degrees, so cast the result to read it in radians.

```
sinh(1rad)            => 1.1752
cosh(1rad)            => 1.5431
tanh(1rad)            => 0.7616
sinh(1)               => 0.0175
(asinh(1.1752))rad    => 1 rad
```

> [!NOTE]
>
> Because angle units are unambiguous, `sin(45 deg)` and `sin((pi/4) rad)` refer to the same angle. See [Units](https://docs.truemath.ai/math/units.md).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.