Skip to content

Commit 9dc66a6

Browse files
[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.
1 parent 98262e5 commit 9dc66a6

File tree

1 file changed

+28
-0
lines changed

1 file changed

+28
-0
lines changed

libc/include/math.yaml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -370,6 +370,13 @@ functions:
370370
return_type: float
371371
arguments:
372372
- type: float
373+
- name: exp10f16
374+
standards:
375+
- stdc
376+
return_type: _Float16
377+
arguments:
378+
- type: _Float16
379+
guard: LIBC_TYPES_HAS_FLOAT16
373380
- name: exp10m1f
374381
standards:
375382
- stdc
@@ -395,6 +402,13 @@ functions:
395402
return_type: float
396403
arguments:
397404
- type: float
405+
- name: exp2f16
406+
standards:
407+
- stdc
408+
return_type: _Float16
409+
arguments:
410+
- type: _Float16
411+
guard: LIBC_TYPES_HAS_FLOAT16
398412
- name: exp2m1f
399413
standards:
400414
- stdc
@@ -414,6 +428,13 @@ functions:
414428
return_type: float
415429
arguments:
416430
- type: float
431+
- name: expf16
432+
standards:
433+
- stdc
434+
return_type: _Float16
435+
arguments:
436+
- type: _Float16
437+
guard: LIBC_TYPES_HAS_FLOAT16
417438
- name: expm1
418439
standards:
419440
- stdc
@@ -426,6 +447,13 @@ functions:
426447
return_type: float
427448
arguments:
428449
- type: float
450+
- name: expm1f16
451+
standards:
452+
- stdc
453+
return_type: _Float16
454+
arguments:
455+
- type: _Float16
456+
guard: LIBC_TYPES_HAS_FLOAT16
429457
- name: f16add
430458
standards:
431459
- llvm_libc_ext

0 commit comments

Comments
 (0)