# Divers

### Retirer une unité ou un pourcentage d'un nombre

Pour retirer l'unité, le taux ou le pourcentage d'un nombre, convertissez-le en `nombre` (ou décimal)

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

### Proportions / Règle des trois

Connu sous le nom de [règle des trois](https://en.wikipedia.org/wiki/Cross-multiplication#Rule_of_Three), ces phrases vous aident à trouver le nombre nécessaire pour maintenir une proportion.

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

Ces phrases fonctionnent également avec des unités :

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

### Comparer des nombres

min() et max() dans 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
```

### Point médian

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

### Nombres aléatoires

Pour générer un entier aléatoire dans une plage spécifiée :

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

Pour générer un nombre flottant aléatoire, utilisez la plage 0 à 1

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

### PPCM & PGCD

Plus petit commun multiple et plus grand commun diviseur

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

### Permutations & Combinaisons

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

Ou utilisez alternativement une syntaxe légèrement plus claire :

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

### Écraser

```
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/fr/reference-de-syntaxe/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.
