[libc][NFC] For remquo quotient, compare only 3 bits of MPFR and libc results.
authorSiva Chandra Reddy <sivachandra@google.com>
Wed, 26 Aug 2020 06:32:55 +0000 (23:32 -0700)
committerSiva Chandra Reddy <sivachandra@google.com>
Wed, 26 Aug 2020 06:42:06 +0000 (23:42 -0700)
libc/utils/MPFRWrapper/MPFRUtils.cpp

index 1ee5cb1..a121234 100644 (file)
@@ -448,7 +448,7 @@ bool compareBinaryOperationTwoOutputs(Operation op, const BinaryInput<T> &input,
 
   if (mpfrIntResult != libcResult.i) {
     if (op == Operation::RemQuo) {
-      if ((0x7 & mpfrIntResult) != libcResult.i)
+      if ((0x7 & mpfrIntResult) != (0x7 & libcResult.i))
         return false;
     } else {
       return false;