---
title: math.roundhalfdown
summary: null
url: >-
  https://www.fastly.com/documentation/reference/vcl/functions/math-rounding/math-roundhalfdown
---

```
FLOAT math.roundhalfdown(FLOAT x)
```

**Available in:** all subroutines

Rounds to nearest, ties towards negative infinity (also known as _half down_).

## Return Value

If `x` is `math.NAN`, a NaN will be returned.

If `x` is integral, ±0, `x` itself is returned.

If `x` is `math.POS_INFINITY` or
`math.NEG_INFINITY`, an infinity
of the same sign is returned.

Otherwise, the rounded value of `x` is returned.
