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