ilen
- Date:
10-12-2011
NAME
ILEN - Returns the length of the two’s complement representation of an integer
SYNOPSIS
ILEN ([I=]i)
IMPLEMENTATION
Cray Linux Environment (CLE)
STANDARDS
Fortran extension
DESCRIPTION
The ILENfunction returns the length, in bits, of the two’s complement representation of an integer. This function accepts the following argument:
- i
Must be of type integer.
ILEN is an elemental function. The name of this intrinsic cannot be passed as an argument.
RETURN VALUES
The value returned is an integer of the same kind type as i.
If i >= 0, the result value is (LOG2(i+1)).
If i < 0, the result value is (LOG2(-i)).
EXAMPLES
Example 1. ILEN(4) has the value 3.
Example 2. ILEN(-4) has the value 2.