# Varie

### Rimuovere un'unità o una percentuale da un numero

Per rimuovere l'unità, il tasso o la percentuale da un numero, convertilo in un `numero` (o decimale)

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

### Proporzioni / Regola dei tre

Conosciute come la [regola dei tre](https://en.wikipedia.org/wiki/Cross-multiplication#Rule_of_Three), queste frasi ti aiutano a trovare il numero necessario per mantenere una proporzione.

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

Queste frasi funzionano anche con le unità:

```
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
```

### Confrontare i numeri

min() e max() in 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
```

### Numeri casuali

Per generare un intero casuale in un intervallo specificato:

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

Per generare un numero a virgola mobile casuale, usa l'intervallo da 0 a 1

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

### MCM e MDC

Minimo comune multiplo e massimo comune divisore

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

### Permutazioni e Combinazioni

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

Oppure usa un sintassi leggermente più chiara:

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

### Limitare

```
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/it/riferimento-sintassi/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.
