[libc-commits] [PATCH] D143116: edit the error message

Renyi Chen via Phabricator via libc-commits libc-commits at lists.llvm.org
Wed Feb 1 15:44:02 PST 2023


renyichen created this revision.
Herald added projects: libc-project, All.
Herald added a subscriber: libc-commits.
renyichen requested review of this revision.

Add scalbn scalbnf scalbnl.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D143116

Files:
  libc/src/math/generic/scalbn.cpp
  libc/src/math/generic/scalbnf.cpp
  libc/src/math/generic/scalbnl.cpp


Index: libc/src/math/generic/scalbnl.cpp
===================================================================
--- libc/src/math/generic/scalbnl.cpp
+++ libc/src/math/generic/scalbnl.cpp
@@ -16,7 +16,7 @@
 #if !defined(__FLT_RADIX__)
 #error __FLT_RADIX__ undefined.
 #elif __FLT_RADIX__ != 2
-#error __FLT_RADIX__!=2.
+#error __FLT_RADIX__!=2, unimplemented.
 #else
   return fputil::ldexp(x, n);
 #endif
Index: libc/src/math/generic/scalbnf.cpp
===================================================================
--- libc/src/math/generic/scalbnf.cpp
+++ libc/src/math/generic/scalbnf.cpp
@@ -16,7 +16,7 @@
 #if !defined(__FLT_RADIX__)
 #error __FLT_RADIX__ undefined.
 #elif __FLT_RADIX__ != 2
-#error __FLT_RADIX__!=2.
+#error __FLT_RADIX__!=2, unimplemented.
 #else
   return fputil::ldexp(x, n);
 #endif
Index: libc/src/math/generic/scalbn.cpp
===================================================================
--- libc/src/math/generic/scalbn.cpp
+++ libc/src/math/generic/scalbn.cpp
@@ -14,11 +14,11 @@
 
 LLVM_LIBC_FUNCTION(double, scalbn, (double x, int n)) {
 #if !defined(__FLT_RADIX__)
-#error __FLT_RADIX__!=2.
-#elif __FLT_RADIX__ == 2
-  return fputil::ldexp(x, n);
-#else
 #error __FLT_RADIX__ undefined.
+#elif __FLT_RADIX__ != 2
+#error __FLT_RADIX__!=2, unimplemented.
+#else
+  return fputil::ldexp(x, n);
 #endif
 }
 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D143116.494092.patch
Type: text/x-patch
Size: 1339 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libc-commits/attachments/20230201/75cce82a/attachment.bin>


More information about the libc-commits mailing list