*------------- Telecommunications & Signal Processing Lab --------------
*                          McGill University
*
*
* Module:
*     INTEGER FUNCTION IFLORX (X)
*
*
* Purpose:
*     Calculate the floor function
*
*
* Description:
*     This function calculate the floor function of x.  It returns the
*     largest integer that is less than or equal to x.
*
*
* Parameters:
* I <-  IFLORX - Returned integer value
*
* R ->  X      - Input value
*
*
* Author / revision:
*     P. Kabal
*     $Revision: 1.4 $  $Date: 1995/03/08 15:26:50 $
*
*
*-----------------------------------------------------------------------

      INTEGER FUNCTION IFLORX (X)


      REAL X


* For positive values, INT(.) works as the floor function
      IFLORX=INT(X)
      IF (X.LT.0.0 .AND. X.NE.IFLORX) IFLORX=IFLORX-1


      RETURN

      END
