[llvm] [libc] [libc][math] Implement nan(f|l) functions (PR #76690)

via llvm-commits llvm-commits at lists.llvm.org
Thu Jan 4 06:43:38 PST 2024


================
@@ -1055,6 +1056,37 @@ hexadecimal_string_to_float(const char *__restrict src,
   return output;
 }
 
+struct NanMantissaResult {
+  uint64_t value;
+  int error;
+
+  LIBC_INLINE constexpr NanMantissaResult(uint64_t value, int error)
+      : value(value), error(0) {}
+};
+
+LIBC_INLINE NanMantissaResult
+nan_mantissa_from_ncharseq(const cpp::string_view ncharseq) {
----------------
lntue wrote:

`const` qualifier for value type in the function signature is not needed / effective.

https://github.com/llvm/llvm-project/pull/76690


More information about the llvm-commits mailing list