# Misceláneos

### Eliminar una unidad o porcentaje de un número

Para eliminar la unidad, la tasa o el porcentaje de un número, conviértelo a un `number` (o decimal)

```
$100 as number    | 100
40/day to decimal | 40
20% as dec        | 0.2
```

### Proporciones / Regla de tres

Conocidas como la [regla de tres](https://en.wikipedia.org/wiki/Cross-multiplication#Rule_of_Three), estas frases te ayudan a encontrar el número necesario para mantener una proporción.

```
6 is to 60 as 8 is to what  | 80
5 is to 10 as what is to 80 | 40
```

Estas frases también funcionan con unidades:

```
5 km is to 500m as 5 cm is to what                | 5 mm
30 minutes is to 3 hours as what is to 60 seconds | 10 seconds
```

### Comparar números

min() y max() en Soulver

```
larger of 100 and 200  | 200
greater of 100 and 200 | 200
                                                     
smaller of 5 and 10    | 5
lesser of 5 and 10     | 5
```

### Punto medio

```
half of 175                  | 87.5
midpoint between 150 and 300 | 225
```

### Números aleatorios

Para generar un número entero aleatorio en un rango especificado:

```
random number between 1 and 10 | 7
```

Para generar un número de punto flotante aleatorio, usa el rango de 0 a 1

```
random number between 0 and 1 | 0.4793193723
```

### MCM y MCD

Mínimo común múltiplo y máximo común divisor

```
gcd of 20 and 30 | 10
lcm of 5 and 8   | 40
```

### Permutaciones y Combinaciones

```
10 permutation 3 | 720
25 combination 3 | 2,300
```

O alternativamente, usa una sintaxis ligeramente más clara:

```
3 permutations of 10 | 720
3 combinations of 25 | 2,300
```

### Limitar

```
clamp 26 between 5 and 25 | 25
clamp 4 from 5 to 25      | 5
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://documentation.soulver.app/es/referencia-de-sintaxis/general/general.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
