next up previous contents
Next: PRODUCT_PREFIX(ARRAYDIM, MASK, SEGMENT, Up: Specifications of Library Procedures Previous: POPPAR(I)

POPPAR(I)

Description. Return the parity of an integer.

Class. Elemental function.

Argument. I must be of type integer.

Result Type and Type Parameter. Same as I.

Result Value. POPPAR(I) is 1 if there are an odd number of one bits in I and zero if there are an even number. The model for the interpretation of an integer as a sequence of bits is in Section F95:13.5.7

Example. For scalar I, POPPAR(I) = MERGE(1,0,BTEST(POPCNT(I),0)).