mech-math 0.3.4

Math library for the Mech language
Documentation
math/log10
===============================================================================

%% Base-10 logarithm

1. Usage
-------------------------------------------------------------------------------

```mech:disabled
Y := math/log10(X)
```

2. Description
-------------------------------------------------------------------------------

Computes the base-10 logarithm elementwise:

$$ \log_{10}(x) = \frac{\ln(x)}{\ln(10)} 

3. Input
-------------------------------------------------------------------------------

| Argument | Kind                         | Description |
|----------|------------------------------|-------------|
| `X`      | `float`, `[float]`, `matrix` | Real-valued input(s). Scalars (`f64`, `f32`) and their vector/matrix forms. Must be positive. |

4. Output
-------------------------------------------------------------------------------

| Argument | Kind             | Description |
|----------|------------------|-------------|
| `Y`      | matches input    | Base-10 logarithm of `X`, elementwise. Shape and precision match the input. |

5. Examples  
-------------------------------------------------------------------------------

(a) Scalar value

```mech:ex1
y := math/log10(1000.0)          
```

(b) Vector input

```mech:ex2
x := [1.0, 10.0, 100.0, 1000.0]
y := math/log10(x)                
```

(c) Matrix input

```mech:ex3
x := [10.0, 100.0; 1000.0, 1.0]
y := math/log10(x)               
```

6. Details
-------------------------------------------------------------------------------

- **Definition:** $$ y = \log_{10}(x) $$
- **Domain:** Requires $$ x > 0 $$.  
- **Special values:**
  - $$ \log_{10}(1) = 0 $$
  - $$ \log_{10}(10) = 1 $$
  - $$ \log_{10}(+\infty) = +\infty $$
  - $$ \log_{10}(0^+) = -\infty $$
- **NaN:** If `x` is negative or `NaN`, the result is `NaN`.

7. Notes for Implementers
-------------------------------------------------------------------------------

Backed by Rust/libm `log10` (f64) and `log10f` (f32). Dispatch covers scalar,
vector, and matrix forms. Operates elementwise with consistent shape and type.

8. See also
-------------------------------------------------------------------------------

`math/log`, `math/log2`, `math/log1p`