[libc-commits] [PATCH] D87516: [libc] Add implementation for hypotf

Siva Chandra via Phabricator via libc-commits libc-commits at lists.llvm.org
Thu Sep 17 09:05:35 PDT 2020


sivachandra accepted this revision.
sivachandra added inline comments.
This revision is now accepted and ready to land.


================
Comment at: libc/src/math/hypotf.cpp:1
+//===-- Implementation of hypotf function ---------------------------------===//
+//
----------------
With other implementations in `libc/src`, we have followed `snake_case`. I think we should do that here for consistency.


================
Comment at: libc/src/math/hypotf.cpp:99
+  uint32_t aMant, bMant;
+  uint64_t aMantSq, bMantSq;
+  bool stickyBits;
----------------
I understand why the use of a 64-bit integers is required here. But, I would ideally prefer to restrict a function which deals with 32-bit numbers not have to deal with wider numbers. It surely is not a problem on most modern architectures. So, we can revisit if it ever becomes a problem. FWIW, the AOR implementations also switch to `double_t` for higher precision with intermediate computations.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D87516



More information about the libc-commits mailing list