math/acot
===============================================================================
%% Arc cotangent of argument in radians
1. Usage
-------------------------------------------------------------------------------
```mech:disabled
Y := math/acot(X)
```
2. Description
-------------------------------------------------------------------------------
Computes the arc cotangent (inverse cotangent) of each element of `X`. The input `X` is interpreted as a numeric value. The result `Y` has the same shape as the input `X`.
3. Input
-------------------------------------------------------------------------------
| Argument | Kind | Description |
|----------|--------------------------|---------------------------------------|
| `X` | `float`, `[float]` | Input value(s). Can be real or complex. For real inputs, any real number is allowed. For complex inputs, results are computed accordingly. |
4. Output
-------------------------------------------------------------------------------
| Argument | Kind | Description |
|----------|--------------------------|---------------------------------------|
| `Y` | matches input | Arc cotangent of the input values, expressed in radians. For real inputs, results are in the range `(0, π)`. The shape of `Y` matches the shape of `X`. |
5. Examples
-------------------------------------------------------------------------------
(a) Find the arc cotangent of a number
```mech:ex1
y := math/acot(1.0)
```
(b) Find the arc cotangent for a vector of numbers
```mech:ex2
x := [1, -1, 10]
y := math/acot(x)
```
(c) Find the arc cotangent for a matrix of numbers
```mech:ex3
x := [1, 2; -3, 4]
y := math/acot(x)
```
(d) Relationship with atan
```mech:ex4
x := [1, 2, 3]
y := math/acot(x) # equivalent to atan(1/x)
```
6. Details
-------------------------------------------------------------------------------
The arc cotangent (inverse cotangent) function returns the angle whose cotangent is the specified value.
For real numbers $$x$$:
$$ y = acot(x)
means $$ cot(y) = x $$, with $$ y \in (0, π) $$.
It can be expressed in terms of arctangent:
$$ acot(x) = atan(1/x)
for $$x \neq 0$$. At $$x = 0$$, $$acot(0) = π/2$$.
For complex numbers, arc cotangent can be expressed as:
$$ acot(z) = \frac{i}{2} \ln \left( \frac{z - i}{z + i} \right)
This definition extends the function beyond real numbers, allowing it to handle complex inputs.