Skip to content

Commit d820ed5

Browse files
committed
Addressed style comments:
- Everything pointed out by @overmighty - Fixed math.yaml to make sure it has all functions from upstream TODO: - Modify MPFRWrapper to work with acospi using older version of MPFR
1 parent 687dac4 commit d820ed5

File tree

4 files changed

+46
-9
lines changed

4 files changed

+46
-9
lines changed

libc/config/linux/x86_64/entrypoints.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -657,8 +657,8 @@ if(LIBC_TYPES_HAS_FLOAT16)
657657
list(APPEND TARGET_LIBM_ENTRYPOINTS
658658
# math.h C23 _Float16 entrypoints
659659
libc.src.math.acosf16
660-
libc.src.math.acospif16
661660
libc.src.math.acoshf16
661+
libc.src.math.acospif16
662662
libc.src.math.asinf16
663663
libc.src.math.asinhf16
664664
libc.src.math.canonicalizef16

libc/include/math.yaml

Lines changed: 43 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,19 +21,26 @@ functions:
2121
arguments:
2222
- type: _Float16
2323
guard: LIBC_TYPES_HAS_FLOAT16
24-
- name: acospif16
24+
- name: acoshf
25+
standards:
26+
- stdc
27+
return_type: float
28+
arguments:
29+
- type: float
30+
name: acoshf16
2531
standards:
2632
- stdc
2733
return_type: _Float16
2834
arguments:
2935
- type: _Float16
3036
guard: LIBC_TYPES_HAS_FLOAT16
31-
- name: acoshf
37+
name: acospif16
3238
standards:
3339
- stdc
34-
return_type: float
40+
return_type: _Float16
3541
arguments:
36-
- type: float
42+
- type: _Float16
43+
guard: LIBC_TYPES_HAS_FLOAT16
3744
- name: asin
3845
standards:
3946
- stdc
@@ -59,6 +66,13 @@ functions:
5966
return_type: float
6067
arguments:
6168
- type: float
69+
- name: asinhf16
70+
standards:
71+
- stdc
72+
return_type: _Float16
73+
arguments:
74+
- type: _Float16
75+
guard: LIBC_TYPES_HAS_FLOAT16
6276
- name: atan
6377
standards:
6478
- stdc
@@ -86,6 +100,14 @@ functions:
86100
arguments:
87101
- type: long double
88102
- type: long double
103+
- name: atan2f128
104+
standards:
105+
- stdc
106+
return_type: float128
107+
arguments:
108+
- type: float128
109+
- type: float128
110+
guard: LIBC_TYPES_HAS_FLOAT128
89111
- name: atanf
90112
standards:
91113
- stdc
@@ -749,6 +771,15 @@ functions:
749771
- type: float
750772
- type: float
751773
- type: float
774+
- name: fmaf16
775+
standards:
776+
- stdc
777+
return_type: _Float16
778+
arguments:
779+
- type: _Float16
780+
- type: _Float16
781+
- type: _Float16
782+
guard: LIBC_TYPES_HAS_FLOAT16
752783
- name: fmax
753784
standards:
754785
- stdc
@@ -1379,6 +1410,14 @@ functions:
13791410
arguments:
13801411
- type: float
13811412
- type: float
1413+
- name: hypotf16
1414+
standards:
1415+
- stdc
1416+
return_type: _Float16
1417+
arguments:
1418+
- type: _Float16
1419+
- type: _Float16
1420+
guard: LIBC_TYPES_HAS_FLOAT16
13821421
- name: ilogb
13831422
standards:
13841423
- stdc

libc/src/math/generic/acospif16.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
1-
//===-- Half-precision acospif16(x) function ------------------------------===//
1+
//===-- Half-precision acospi function ------------------------------===//
22
//
33
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
44
// See https://llvm.org/LICENSE.txt for license information.
55
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception.
66
//
7-
//
87
//===----------------------------------------------------------------------===//
98

109
#include "src/math/acospif16.h"
@@ -40,7 +39,7 @@ LLVM_LIBC_FUNCTION(float16, acospif16, (float16 x)) {
4039
return x;
4140
}
4241

43-
// 1 < |x| <= +/-inf
42+
// 1 < |x| <= +inf
4443
fputil::raise_except_if_required(FE_INVALID);
4544
fputil::set_errno_if_required(EDOM);
4645

libc/test/src/math/smoke/acospif16_test.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
//===-- Unittests for acospif16 -------------------------------------------===//
22
//
3-
//
43
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
54
// See https://llvm.org/LICENSE.txt for license information.
65
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception.

0 commit comments

Comments
 (0)