XL Fortran for AIX 8.1

Language Reference

+-------------------------------IBM Extension--------------------------------+


LEADZ(I)

Returns the number of leading zero-bits in the binary representation of an integer.

I
must be of type integer.

Class

Elemental function

Result Type and Attributes

Same as I.

Result Value

The result is the count of zero-bits to the left of the leftmost one-bit for an integer.

Examples

 I = LEADZ(0_4)  ! I=32
 J = LEADZ(4_4)  ! J=29
 K = LEADZ(-1_4) ! K=0

+----------------------------End of IBM Extension----------------------------+


[ Top of Page | Previous Page | Next Page | Table of Contents | Index ]