W3C home > Mailing lists > Public > public-qt-comments@w3.org > February 2004

[XQuery] IBM-XQ-008: Transitivity of value comparisons

From: Don Chamberlin <chamberl@almaden.ibm.com>
Date: Wed, 11 Feb 2004 15:51:02 -0800
To: public-qt-comments@w3.org
Message-ID: <OFD7489023.E703BC7F-ON88256E37.00814D8A-88256E37.008304E4@us.ibm.com>
(IBM-XQ-008) Section 3.5.1 (Value Comparisons): Value comparisons were 
intended to be transitive, but there is a case in which they are not. 
Suppose that A and C are values of type int (32 bits of precision) that 
differ in their low-order bit. Suppose that B is the value of type float 
(24 bits of precision) into which both A and C are converted by the rules 
for casting int to float. Then "A eq B" is true and "B eq C" is true, but 
"A eq C" is false.

The language documents should state that the value comparison operators 
are transitive except in cases where precision is lost in type-casting of 

--Don Chamberlin
Received on Wednesday, 11 February 2004 18:51:15 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 15:45:17 UTC