[libc-commits] [PATCH] D86666: [libc] Add implementations of remquo[f|l] and remainder[f|l].

Tue Ly via Phabricator via libc-commits libc-commits at lists.llvm.org
Thu Sep 3 12:32:31 PDT 2020


lntue added inline comments.


================
Comment at: libc/utils/FPUtil/DivisionAndRemainderOperations.h:73
+  NormalFloat<T> remainder(exp + normaly.exponent, mx, 0);
+  T nativeRemainder(remainder);
+  T absy = T(ybits);
----------------
When the remainder is in the subnormal range, I think the final check below is correct, but with an implicit assumption that the rounding from NormalFloat<T> to T is truncation.
Can you add that to comments, in case we change the rounding NormalFloat<T> to T to the default round-to-nearest, tie-to-even?  So that at least we will add more tests for subnormal range to make sure that it still works correctly, even when NormalFloat<T> rounding is updated.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D86666/new/

https://reviews.llvm.org/D86666



More information about the libc-commits mailing list