Fix bug in tcu::Interval::intersects()
authorPyry Haulos <phaulos@google.com>
Wed, 10 Jun 2015 19:19:54 +0000 (12:19 -0700)
committerPyry Haulos <phaulos@google.com>
Wed, 10 Jun 2015 19:20:59 +0000 (12:20 -0700)
This bug (probably just a typo) was causing issues in atan(y, x) tests.
The verification didn't account for small denormal divisors being
flushed to +0.

Bug: 21326633
Change-Id: I044ab38fb7f2ae316dfdac0674eab942fc5c8446

framework/common/tcuInterval.hpp

index 0a2f65f..0c29d57 100644 (file)
@@ -118,7 +118,7 @@ public:
 
        bool            intersects              (const Interval& other) const
        {
-               return ((other.hi() >= lo() && other.lo() >= hi()) ||
+               return ((other.hi() >= lo() && other.lo() <= hi()) ||
                                (other.hasNaN() && hasNaN()));
        }