SMALL_INT Function
Smallest Integer Function. Standard Library function that returns the smallest integer greater than or equal to the passed value. Also known as Ceiling Function.
enabled.
Usage
result = SMALL_INT(x)
Input Parameters
x—An array or scalar of any real data-type, usually float or double.
Returned Value
result—A scalar or array of the same dimensions as x, where result(i) is the smallest integer greater than or equal to x(i). result is of type long unless the Floatingpoint keyword has been set.
Keywords
Floatingpoint—If this keyword is present and the input array is of type float or double, the output array is of the same type as the input.
Examples
PRINT, SMALL_INT( [-0.5, 0, 0.5] )
; PV-WAVE prints: 0 0 1
x = [-2.1, -1.9, 0, 1.9, 2.1]
PRINT, SMALL_INT(x)
; PV-WAVE prints: -2 -1 0 2 3
See Also