2.2 Absolute Functions

R abs(T x)
absolute value of x

int int_step(int x)

int int_step(real x)
Return the step function of x as an integer, \[ \mathrm{int\_step}(x) = \begin{cases} 1 & \text{if } x > 0 \\ 0 & \text{if } x \leq 0 \text{ or } x \text{ is } NaN \end{cases} \] Warning: int_step(0) and int_step(NaN) return 0 whereas step(0) and step(NaN) return 1.

See the warning in section step functions about the dangers of step functions applied to anything other than data.