[libc-commits] [libc] [libc][math][c23] Add scalbln{, f, l, f128} C23 math functions (PR #102219)

via libc-commits libc-commits at lists.llvm.org
Tue Aug 6 14:22:07 PDT 2024


================
@@ -2199,7 +2206,44 @@ functions:
       - type: float128
       - type: int
       - type: unsigned int
-    guard: LIBC_TYPES_HAS_FLOAT128
+    guard: LIBC_TYPES_HAS_FLOAT128scalbln
+  - name: scalbln
+    standards: 
+      - stdc
+    return_type: double
+    arguments:
+      - type: double
+      - type: long
+  - name: scalblnl
+    standards:
+      - stdc
+    return_type: long double
+    arguments:
+      - type: long double
+      - type: long
+  - name: scalblnf
+    standards:
+      - stdc
+    return_type: long double
+    arguments:
+      - type: float
+      - type: long
+  - name: scalblnf16
+    standards:
+      - stdc
+    return_type: float16
+    arguments:
+      - type: float16
+      - type: long
+    guard: LIBC_HAS_TYPES_FLOAT16
+  - name: scalblnf128
+    standards:
+      - llvm_libc_ext
----------------
overmighty wrote:

All the `scalbln*` functions are standard C functions. They're not LLVM libc extensions.

You can use https://www.open-std.org/jtc1/sc22/wg14/www/docs/n3096.pdf if you need access to a draft of the C23 standard. You can also look up pre-C23 functions on cppreference.com.

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


More information about the libc-commits mailing list