[libc-commits] [PATCH] D144597: [libc] Refactor string to float return values
Siva Chandra via Phabricator via libc-commits
libc-commits at lists.llvm.org
Fri Feb 24 16:10:14 PST 2023
sivachandra accepted this revision.
sivachandra added inline comments.
This revision is now accepted and ready to land.
================
Comment at: libc/src/__support/str_to_float.h:36
+ typename fputil::FPBits<T>::UIntType mantissa = 0;
+ int32_t exponent = 0;
+ int error = 0;
----------------
Can you combine `mantissa` and `exponent` into a `FloatPair` value? Can it be `cpp::optional<FloatPair>`?
================
Comment at: libc/src/__support/str_to_float.h:28
+template <class T> struct FloatPair {
+ typename fputil::FPBits<T>::UIntType mantissa;
----------------
michaelrj wrote:
> sivachandra wrote:
> > Bikeshed: s/`FloatPair`/`FloatComponents` ?
> I like `FloatPair` better, personally, but it doesn't really matter to me.
My concern is that `FloatPair` sounds like it holds two floating point values.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D144597/new/
https://reviews.llvm.org/D144597
More information about the libc-commits
mailing list