Skip to content

Commit 2429a8f

Browse files
authored
[libc] Add missing and correct some existing C23 functions to math.h (#156512)
This change fixes and closes some gaps in the YAML template for producing the math.h header. It adds some missing declarations (dadd/dsub function variants), correct arguments and/or return type for other functions from this family (dsqrt and ddiv), and add a missing fminimum_numl variant.
1 parent 9f8988a commit 2429a8f

File tree

1 file changed

+46
-2
lines changed

1 file changed

+46
-2
lines changed

libc/include/math.yaml

Lines changed: 46 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -317,10 +317,33 @@ functions:
317317
arguments:
318318
- type: _Float16
319319
guard: LIBC_TYPES_HAS_FLOAT16
320+
- name: daddf128
321+
standards:
322+
- llvm_libc_ext
323+
return_type: double
324+
arguments:
325+
- type: float128
326+
- type: float128
327+
guard: LIBC_TYPES_HAS_FLOAT128
328+
- name: daddl
329+
standards:
330+
- stdc
331+
return_type: double
332+
arguments:
333+
- type: long double
334+
- type: long double
335+
- name: ddivf128
336+
standards:
337+
- llvm_libc_ext
338+
return_type: double
339+
arguments:
340+
- type: float128
341+
- type: float128
342+
guard: LIBC_TYPES_HAS_FLOAT128
320343
- name: ddivl
321344
standards:
322345
- stdc
323-
return_type: long double
346+
return_type: double
324347
arguments:
325348
- type: long double
326349
- type: long double
@@ -339,20 +362,34 @@ functions:
339362
arguments:
340363
- type: long double
341364
- type: long double
365+
- name: dsqrtf128
366+
standards:
367+
- llvm_libc_ext
368+
return_type: double
369+
arguments:
370+
- type: float128
371+
guard: LIBC_TYPES_HAS_FLOAT128
342372
- name: dsqrtl
343373
standards:
344374
- stdc
345375
return_type: double
346376
arguments:
347377
- type: long double
348-
- name: dsqrtf128
378+
- name: dsubf128
349379
standards:
350380
- llvm_libc_ext
351381
return_type: double
352382
arguments:
353383
- type: float128
354384
- type: float128
355385
guard: LIBC_TYPES_HAS_FLOAT128
386+
- name: dsubl
387+
standards:
388+
- stdc
389+
return_type: double
390+
arguments:
391+
- type: long double
392+
- type: long double
356393
- name: erff
357394
standards:
358395
- stdc
@@ -1174,6 +1211,13 @@ functions:
11741211
- type: _Float16
11751212
- type: _Float16
11761213
guard: LIBC_TYPES_HAS_FLOAT16
1214+
- name: fminimum_numl
1215+
standards:
1216+
- stdc
1217+
return_type: long double
1218+
arguments:
1219+
- type: long double
1220+
- type: long double
11771221
- name: fminimumf
11781222
standards:
11791223
- stdc

0 commit comments

Comments
 (0)