github.com/anth0d/nomad@v0.0.0-20221214183521-ae3a0a2cad06/website/content/docs/job-specification/hcl2/functions/numeric/floor.mdx (about) 1 --- 2 layout: docs 3 page_title: floor - Functions - Configuration Language 4 description: |- 5 The floor function returns the closest whole number less than or equal to 6 the given value. 7 --- 8 9 # `floor` Function 10 11 `floor` returns the closest whole number that is less than or equal to the 12 given value, which may be a fraction. 13 14 ## Examples 15 16 ```shell-session 17 > floor(5) 18 5 19 > floor(4.9) 20 4 21 ``` 22 23 ## Related Functions 24 25 - [`ceil`](/docs/job-specification/hcl2/functions/numeric/ceil), which rounds to the nearest whole number _greater than_ 26 or equal.