The FLOOR function returns the closest integer less than or equal to its argument.
Result = FLOOR(X [, /L64 ] )
If the input argument X is an integer type, Result has the same value and type as X. Otherwise, Result is a 32-bit longword integer with the same structure as X.
The value for which the FLOOR function is to be evaluated. This value can be any numeric type (integer, floating, or complex).
If set, the result type is 64-bit integer regardless of the input type. This is useful for situations in which a floating point number contains a value too large to be represented in a 32-bit integer.
This routine is written to make use of IDL's thread pool, which can increase execution speed on systems with multiple CPUs. The values stored in the
To print the floor function of 5.9, enter:
PRINT, FLOOR(5.9) ; IDL prints: 5
To print the floor function of 3000000000.1, the result of which is too large to represent in a 32-bit integer:
PRINT, FLOOR(3000000000.1D, /L64) ; IDL prints: 3000000000
Introduced: Pre 4.0