LEADZ — Number of leading zero bits of an integerLEADZ returns the number of leading zero bits of an integer. RESULT = LEADZ(I) | I | Shall be of type INTEGER. |
INTEGER. If all the bits of I are zero, the result value is BIT_SIZE(I). PROGRAM test_leadz WRITE (*,*) BIT_SIZE(1) ! prints 32 WRITE (*,*) LEADZ(1) ! prints 31 END PROGRAM
© Free Software Foundation
Licensed under the GNU Free Documentation License, Version 1.3.
https://gcc.gnu.org/onlinedocs/gcc-5.4.0/gfortran/LEADZ.html