This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 2396 - fn-deep-equal-mix-args-019 results are wrong
Summary: fn-deep-equal-mix-args-019 results are wrong
Status: RESOLVED FIXED
Alias: None
Product: XML Query Test Suite
Classification: Unclassified
Component: XML Query Test Suite (show other bugs)
Version: 0.7.0
Hardware: PC Windows XP
: P2 normal
Target Milestone: ---
Assignee: Ravindranath (Ravi) Chennoju
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-10-20 09:30 UTC by Michael Kay
Modified: 2005-10-27 21:22 UTC (History)
0 users

See Also:


Attachments

Description Michael Kay 2005-10-20 09:30:14 UTC
The published results for fn-deep-equal-mix-args-019 assume that float(1.01) and
double(1.01) are equal. I think the correct result is "false": these two values
are not equal.

We compare a float to a double by converting the float to a double, and then
comparing the two doubles. The float value 1.01 has an exponent of zero and a
mantissa (in hex) of 1.028f5c. Conversion to a double will produce a double with
the same exponent and mantissa. But the double 1.01 has an exponent of zero and
a mantissa (in hex) of 1.028f5c28f5c29. The two mantissas are not equal, so the
result is false.

Michael Kay
Comment 1 Michael Rys 2005-10-20 18:47:42 UTC
I agree with your assessment.
Comment 2 Ravindranath (Ravi) Chennoju 2005-10-27 21:22:34 UTC
Agree with comments. Fixed the log.