To: J3 07-329r1
From: Van Snyder (original from Bill Long)
Subject: Bitwise compare intrinsics
Date: 2007 November 14
References: J3/07-007r3, WG5/N1695, J3/07-326
Discussion
Part 2 of paper N1695 lists new intrinsics, BGE, BGT, BLE, BLT, to be
added to enable bitwise compare operations that were deleted as
intrinsic operations when the BITS data type was deleted. Edits are
provided for the descriptions of these functions.
Edits to 07-007r3:
[342:Table 13.1] In Table 13.1 "Standard generic intrinsic procedure
summary", add the following new entries following the entry for
BESSEL_YN:
"BGE (I, J) E True if and only if I is bitwise greater than
or equal to J.
BGT (I, J) E True if and only if I is bitwise greater than J.
BLE (I, J) E True if and only if I is bitwise less than
or equal to J.
BLT (I, J) E True if and only of I is bitwise less than J."
[358:26+] Following 13.7.25 "BESSEL_YN...", add 4 new subclauses:
"13.7.25a BGE (I, J)
Description. True if and only if I is bitwise greater than or equal to J.
Class. Elemental.
Arguments.
I shall be of type integer or a .
J shall be of type integer or a .
Result Characteristics. Default logical.
Result Value. The result is true if the sequence of bits represented by I
is greater than or equal to the sequence of bits represented by J,
according to the method of bit sequence comparison specified in 13.3.2.
Otherwise the result is false.
The interpretation of a as a sequence of bits is
specified in 4.6a. The interpretation of an integer value as a sequence of
bits is specified in 13.3.1.
13.7.25b BGT (I, J)
Description. True if and only if I is bitwise greater than J.
Class. Elemental.
Arguments.
I shall be of type integer or a .
J shall be of type integer or a .
Result Characteristics. Default logical.
Result Value. The result is true if the sequence of bits represented by I
is greater than the sequence of bits represented by J, according to the
method of bit sequence comparison specified in 13.3.2. Otherwise the
result is false.
The interpretation of a as a sequence of bits is
specified in 4.6a. The interpretation of an integer value as a sequence of
bits is specified in 13.3.1.
13.7.25c BLE (I, J)
Description. True if and only is I is bitwise less than or equal to J.
Class. Elemental.
Arguments.
I shall be of type integer or a .
J shall be of type integer or a .
Result Characteristics. Default logical.
Result Value. The result is true if the sequence of bits represented by I
is less than or equal to the sequence of bits represented by J, according
to the method of bit sequence comparison specified in 13.3.2. Otherwise
the result is false.
The interpretation of a as a sequence of bits is
specified in 4.6a. The interpretation of an integer value as a sequence of
bits is specified in 13.3.1.
13.7.25d BLT (I, J)
Description. True if and only if I is bitwise less than J.
Class. Elemental.
Arguments.
I shall be of type integer or a .
J shall be of type integer or a .
Result Characteristics. Default logical.
Result Value. The result is true if the sequence of bits represented by I
is less than the sequence of bits represented by J, according to the
method of bit sequence comparison specified in 13.3.2. Otherwise the
result is false.
The interpretation of a as a sequence of bits is
specified in 4.6a. The interpretation of an integer value as a sequence of
bits is specified in 13.3.1.