[libc-commits] [libc] [libc][math] Added missing gamma, error, and fma entries to math.yaml (PR #199340)

Arnav Mundada via libc-commits libc-commits at lists.llvm.org
Sat May 23 07:03:01 PDT 2026


https://github.com/ArnavM21git updated https://github.com/llvm/llvm-project/pull/199340

>From 23f48c67f18b22b3c1745a3f5a32256948cd3445 Mon Sep 17 00:00:00 2001
From: Arnav Mundada <arnav.mundada at vit.edu.in>
Date: Sat, 23 May 2026 16:14:24 +0530
Subject: [PATCH 1/5] [libc][math] Add missing gamma, error, and fma functions
 to math.yaml

---
 libc/include/math.yaml | 35 +++++++++++++++++++++++++++++++++++
 1 file changed, 35 insertions(+)

diff --git a/libc/include/math.yaml b/libc/include/math.yaml
index 36ff380a1b305..bfe2790bafbed 100644
--- a/libc/include/math.yaml
+++ b/libc/include/math.yaml
@@ -359,6 +359,23 @@ functions:
     arguments:
       - type: long double
       - type: long double
+  - name: dfmaf128
+    standards:
+      - stdc
+    return_type: double
+    arguements:
+      - type: float128
+      - type: float128
+      - type: float128
+    guard: LIBC_TYPES_HAS_FLOAT128
+  - name: dfmal
+    standards:
+      - stdc
+    return_type: double
+    arguements:
+      - type: long double
+      - type: long double
+      - type: long double
   - name: dmulf128
     standards:
       - llvm_libc_ext
@@ -402,6 +419,12 @@ functions:
     arguments:
       - type: long double
       - type: long double
+  - name: erf
+    standards:
+      - stdc
+    return_type: double
+    arguements:
+      - type: double
   - name: erff
     standards:
       - stdc
@@ -2698,6 +2721,18 @@ functions:
     arguments:
       - type: _Float16
     guard: LIBC_TYPES_HAS_FLOAT16
+  - name: tgamma
+    standards:
+      - stdc
+    return_type: double
+    arguements:
+      - type: double
+  - name: tgammaf
+    standards:
+      - stdc
+    return_type: float
+    arguements:
+      - type: float
   - name: totalorder
     standards:
       - stdc

>From 806e7cb805c29fe491cb4a0df6677953cfc76b5b Mon Sep 17 00:00:00 2001
From: Arnav Mundada <arnav.dev.mail at gmail.com>
Date: Sat, 23 May 2026 19:13:38 +0530
Subject: [PATCH 2/5] Update libc/include/math.yaml

Co-authored-by: Zorojuro <sawantsukumar at gmail.com>
---
 libc/include/math.yaml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libc/include/math.yaml b/libc/include/math.yaml
index bfe2790bafbed..1ff4e00b8f42e 100644
--- a/libc/include/math.yaml
+++ b/libc/include/math.yaml
@@ -372,7 +372,7 @@ functions:
     standards:
       - stdc
     return_type: double
-    arguements:
+    arguments:
       - type: long double
       - type: long double
       - type: long double

>From 4a550c49fdf954a294735aa48c3ffa85554e383b Mon Sep 17 00:00:00 2001
From: Arnav Mundada <arnav.dev.mail at gmail.com>
Date: Sat, 23 May 2026 19:13:53 +0530
Subject: [PATCH 3/5] Update libc/include/math.yaml

Co-authored-by: Zorojuro <sawantsukumar at gmail.com>
---
 libc/include/math.yaml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libc/include/math.yaml b/libc/include/math.yaml
index 1ff4e00b8f42e..820a351ec6d1e 100644
--- a/libc/include/math.yaml
+++ b/libc/include/math.yaml
@@ -363,7 +363,7 @@ functions:
     standards:
       - stdc
     return_type: double
-    arguements:
+    arguments:
       - type: float128
       - type: float128
       - type: float128

>From 2d522ffd3ac7992c377a59c6658cc8a89cdd6e1f Mon Sep 17 00:00:00 2001
From: Arnav Mundada <arnav.dev.mail at gmail.com>
Date: Sat, 23 May 2026 19:14:07 +0530
Subject: [PATCH 4/5] Update libc/include/math.yaml

Co-authored-by: Zorojuro <sawantsukumar at gmail.com>
---
 libc/include/math.yaml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libc/include/math.yaml b/libc/include/math.yaml
index 820a351ec6d1e..8e710cb1ee513 100644
--- a/libc/include/math.yaml
+++ b/libc/include/math.yaml
@@ -423,7 +423,7 @@ functions:
     standards:
       - stdc
     return_type: double
-    arguements:
+    arguments:
       - type: double
   - name: erff
     standards:

>From b902b59bfc866fb15c5156a346997ec70407a798 Mon Sep 17 00:00:00 2001
From: Arnav Mundada <arnav.dev.mail at gmail.com>
Date: Sat, 23 May 2026 19:19:27 +0530
Subject: [PATCH 5/5] Correct 'arguements' to 'arguments' in math.yaml

---
 libc/include/math.yaml | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/libc/include/math.yaml b/libc/include/math.yaml
index 8e710cb1ee513..59bbd65633478 100644
--- a/libc/include/math.yaml
+++ b/libc/include/math.yaml
@@ -2725,13 +2725,13 @@ functions:
     standards:
       - stdc
     return_type: double
-    arguements:
+    arguments:
       - type: double
   - name: tgammaf
     standards:
       - stdc
     return_type: float
-    arguements:
+    arguments:
       - type: float
   - name: totalorder
     standards:



More information about the libc-commits mailing list