Navigation :
floor
floor, function
def const dash autodiff pure floor(quantity: number): number
Returns quantity rounded down to the nearest integer.
quantity: value to round down.
Examples
table T = with
[| as X |]
[| -1.7 |]
[| -0.5 |]
[| 0.2 |]
[| 1.9 |]
show table "Floor" with
T.X
floor(T.X) as "Floor"
This produces the following table:
| X |
Floor |
| -1.7 |
-2 |
| -0.5 |
-1 |
| 0.2 |
0 |
| 1.9 |
1 |
Inside an autodiff block, the gradient for floor is
defined as 1 to support discrete policy optimization.
See also