sastowe
13 years agoSuper Contributor
two doubles not equal when they really are
I have a procedure that I am running for three different test cases. For each test case, I pass a string of expected values. The string is split into an array. I am comparing the data in my database using an ADO recordset to the expected good values.
The first two test cases work fine. In the third test case, each time I evaluate
If rs("ResultValue").Value <> cdbl(asValues(i)) then
This is returning true when the values sure as heck look the same to me. In debugging, I expressly cast each to a double to make sure we are not seeing some data type vagary.
The first two test cases work fine. In the third test case, each time I evaluate
If rs("ResultValue").Value <> cdbl(asValues(i)) then
This is returning true when the values sure as heck look the same to me. In debugging, I expressly cast each to a double to make sure we are not seeing some data type vagary.