floor()

Table of Contents

Definition

floor() rounds down a numerical value to the nearest whole integer.

For other rounding functions, you can use round() or ceiling().

Examples

The following example rounds down the value in 'test' column with floor() and returns the result in a separate column.

| makeresults
| eval test = 5.5
| eval testCeil = floor(test)
Screenshot of the previous example’s result

The following example rounds down 5.9 with floor() and returns 5 as the result.

| makeresults
| eval test = floor(5.9)
Screenshot of the previous example’s result

Further Reading