From 848cab66b8df8f974f9829234525523c35c6eb3d Mon Sep 17 00:00:00 2001 From: Leandro Augusto Lacerda Campos Date: Fri, 22 Aug 2025 23:23:19 -0300 Subject: [PATCH] Add half-precision math functions to `math.h` header --- libc/include/math.yaml | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) 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