Hi Thomas,

I did further testing and have some new findings. Consider this test case:
SELECT
-(CAST('-0.0' AS DOUBLE)) = ZERO(),
(CAST('-0.0' AS DOUBLE)) = -ZERO(),
-(CAST('0.0' AS DOUBLE)) = ZERO(),
(CAST('0.0' AS DOUBLE)) = -ZERO(),
(CAST('-0.0' AS DOUBLE)) = (CAST('0.0' AS DOUBLE))

Apart from the ABS(x) function containing a bug, there is another bug: 0.0 
should be equal to -0.0. This is how Java behaves, and so comparisons to 
ZERO() should also be true in all those cases above.

These problems affect float and double Java types, which means DOUBLE, 
FLOAT, FLOAT8, FLOAT4, REAL for H2.

Please let me know if I am missing something.
-Christopher

-- 
You received this message because you are subscribed to the Google Groups "H2 
Database" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/h2-database.
For more options, visit https://groups.google.com/d/optout.

Reply via email to