## SIGNUM

The `SIGNUM` function in ES|QL returns the sign of a given number. It returns `-1` for negative numbers, `0` for `0`, and `1` for positive numbers.

### Syntax

The syntax for the `SIGNUM` function is as follows:

`SIGNUM(number)`

Here, `number` is a numeric expression. If `null`, the function returns `null`.

### Examples

Here are a couple of examples of how you can use the `SIGNUM` function in ES|QL:

```esql
ROW d = 100.0
| EVAL s = SIGNUM(d)
```

In this example, the `SIGNUM` function is used to determine the sign of the number `100.0`. Since `100.0` is a positive number, the function returns `1`.

```esql
ROW d = -50.0
| EVAL s = SIGNUM(d)
```

In this example, the `SIGNUM` function is used to determine the sign of the number `-50.0`. Since `-50.0` is a negative number, the function returns `-1`.