## ABS

The `ABS` function in ES|QL returns the absolute value of a numeric expression.

### Syntax

`ABS(number)`

#### Parameters

`number`: Numeric expression. If null, the function returns null.

### Examples

Here are a couple of examples of how to use the `ABS` function in ES|QL:

```esql
ROW number = -1.0
| EVAL abs_number = ABS(number)
```

In this example, the `ABS` function is used to calculate the absolute value of `-1.0`, which results in `1.0`.

```esql
FROM employees
| KEEP first_name, last_name, height
| EVAL abs_height = ABS(0.0 - height)
```

In this example, the `ABS` function is used to calculate the absolute value of the height of employees. The height is subtracted from `0.0` to get a negative value, and then the `ABS` function is applied to get the absolute value.