diff options
author | Cedric Nugteren <web@cedricnugteren.nl> | 2017-02-05 14:36:31 +0100 |
---|---|---|
committer | Cedric Nugteren <web@cedricnugteren.nl> | 2017-02-05 14:36:31 +0100 |
commit | e7cbb5915aef16f3a64566292459eaede5a600e5 (patch) | |
tree | 8a18e7018b1922d9d445eede6af7d5140f33dc71 /test/correctness/tester.cpp | |
parent | c209dd7af90d604c8210cc5680b6c7a50b2b995f (diff) |
Fixed complex version of the TRSV kernel
Diffstat (limited to 'test/correctness/tester.cpp')
-rw-r--r-- | test/correctness/tester.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/test/correctness/tester.cpp b/test/correctness/tester.cpp index c449b09d..dc0f842e 100644 --- a/test/correctness/tester.cpp +++ b/test/correctness/tester.cpp @@ -410,6 +410,10 @@ bool TestSimilarityNear(const T val1, const T val2, if (val1 == val2) { return true; } + // Handles cases with both results NaN + else if (std::isnan(val1) && std::isnan(val2)) { + return true; + } // The values are zero or very small: the relative error is less meaningful else if (val1 == 0 || val2 == 0 || difference < error_margin_absolute) { return (difference < error_margin_absolute); |