[libc-commits] [libc] 9dc66a6 - [libc] Add half-precision math functions to the math header (#155060)
via libc-commits
libc-commits at lists.llvm.org
Fri Aug 22 20:06:16 PDT 2025
Author: Leandro Lacerda
Date: 2025-08-22T22:06:12-05:00
New Revision: 9dc66a631e962d85df0db43784028388f77d3fef
URL: https://github.com/llvm/llvm-project/commit/9dc66a631e962d85df0db43784028388f77d3fef
DIFF: https://github.com/llvm/llvm-project/commit/9dc66a631e962d85df0db43784028388f77d3fef.diff
LOG: [libc] Add half-precision math functions to the math header (#155060)
This patch adds the `exp10f16`, `exp2f16`, `expf16`, and `expm1f16` math
functions to the `math.h` header.
Added:
Modified:
libc/include/math.yaml
Removed:
################################################################################
diff --git a/libc/include/math.yaml b/libc/include/math.yaml
index 60e6265eece75..6f48e0e9fd35f 100644
--- a/libc/include/math.yaml
+++ b/libc/include/math.yaml
@@ -370,6 +370,13 @@ functions:
return_type: float
arguments:
- type: float
+ - name: exp10f16
+ standards:
+ - stdc
+ return_type: _Float16
+ arguments:
+ - type: _Float16
+ guard: LIBC_TYPES_HAS_FLOAT16
- name: exp10m1f
standards:
- stdc
@@ -395,6 +402,13 @@ functions:
return_type: float
arguments:
- type: float
+ - name: exp2f16
+ standards:
+ - stdc
+ return_type: _Float16
+ arguments:
+ - type: _Float16
+ guard: LIBC_TYPES_HAS_FLOAT16
- name: exp2m1f
standards:
- stdc
@@ -414,6 +428,13 @@ functions:
return_type: float
arguments:
- type: float
+ - name: expf16
+ standards:
+ - stdc
+ return_type: _Float16
+ arguments:
+ - type: _Float16
+ guard: LIBC_TYPES_HAS_FLOAT16
- name: expm1
standards:
- stdc
@@ -426,6 +447,13 @@ functions:
return_type: float
arguments:
- type: float
+ - name: expm1f16
+ standards:
+ - stdc
+ return_type: _Float16
+ arguments:
+ - type: _Float16
+ guard: LIBC_TYPES_HAS_FLOAT16
- name: f16add
standards:
- llvm_libc_ext
More information about the libc-commits
mailing list