Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 12 additions & 6 deletions docs/language-definition.md
Original file line number Diff line number Diff line change
Expand Up @@ -556,20 +556,26 @@ date("2023-08-14 00:00:00").In(timezone("Europe/Zurich"))

## Number Functions

### max(n1, n2) {#max}
### max(values...) {#max}

Returns the maximum of the two numbers `n1` and `n2`.
Returns the largest number from one or more numeric values, arrays of numeric
values, or a combination of both. Nested arrays are traversed recursively.

```expr
max(5, 7) == 7
max(5, 7, 3) == 7
max([5, 7, 3]) == 7
max([5, 7], 9, [[3, 12]]) == 12
```

### min(n1, n2) {#min}
### min(values...) {#min}

Returns the minimum of the two numbers `n1` and `n2`.
Returns the smallest number from one or more numeric values, arrays of numeric
values, or a combination of both. Nested arrays are traversed recursively.

```expr
min(5, 7) == 5
min(5, 7, 3) == 3
min([5, 7, 3]) == 3
min([5, 7], 2, [[3, -1]]) == -1
```

### abs(n) {#abs}
Expand Down