floor(a: number) 🡒 number, const autodiff pure function
Returns the number rounded down to the nearest integer.
x = 4.2
y = floor(x)
show scalar "" with y
The gradient associated to floor() is 1, instead of 0, as the mathematical definition would suggest. The purpose of this irregular behavior is to facilate the design of discrete policies.