Skip to content

Commit e7adac7

Browse files
committed
Revert "[libc][math][c23] Add ldexpf16 C23 math function"
This reverts commit 7bee516.
1 parent 141f155 commit e7adac7

File tree

13 files changed

+10
-99
lines changed

13 files changed

+10
-99
lines changed

libc/config/linux/aarch64/entrypoints.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -520,7 +520,6 @@ if(LIBC_TYPES_HAS_FLOAT16)
520520
libc.src.math.fromfpf16
521521
libc.src.math.fromfpxf16
522522
libc.src.math.ilogbf16
523-
libc.src.math.ldexpf16
524523
libc.src.math.llogbf16
525524
libc.src.math.llrintf16
526525
libc.src.math.llroundf16

libc/config/linux/x86_64/entrypoints.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -553,7 +553,6 @@ if(LIBC_TYPES_HAS_FLOAT16)
553553
libc.src.math.fromfpf16
554554
libc.src.math.fromfpxf16
555555
libc.src.math.ilogbf16
556-
libc.src.math.ldexpf16
557556
libc.src.math.llogbf16
558557
libc.src.math.llrintf16
559558
libc.src.math.llroundf16

libc/docs/math/index.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ Basic Operations
170170
+------------------+------------------+-----------------+------------------------+----------------------+------------------------+------------------------+----------------------------+
171171
| ilogb | |check| | |check| | |check| | |check| | |check| | 7.12.6.8 | F.10.3.8 |
172172
+------------------+------------------+-----------------+------------------------+----------------------+------------------------+------------------------+----------------------------+
173-
| ldexp | |check| | |check| | |check| | |check| | |check| | 7.12.6.9 | F.10.3.9 |
173+
| ldexp | |check| | |check| | |check| | | |check| | 7.12.6.9 | F.10.3.9 |
174174
+------------------+------------------+-----------------+------------------------+----------------------+------------------------+------------------------+----------------------------+
175175
| llogb | |check| | |check| | |check| | |check| | |check| | 7.12.6.10 | F.10.3.10 |
176176
+------------------+------------------+-----------------+------------------------+----------------------+------------------------+------------------------+----------------------------+

libc/spec/stdc.td

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -532,7 +532,6 @@ def StdC : StandardSpec<"stdc"> {
532532
FunctionSpec<"ldexp", RetValSpec<DoubleType>, [ArgSpec<DoubleType>, ArgSpec<IntType>]>,
533533
FunctionSpec<"ldexpf", RetValSpec<FloatType>, [ArgSpec<FloatType>, ArgSpec<IntType>]>,
534534
FunctionSpec<"ldexpl", RetValSpec<LongDoubleType>, [ArgSpec<LongDoubleType>, ArgSpec<IntType>]>,
535-
GuardedFunctionSpec<"ldexpf16", RetValSpec<Float16Type>, [ArgSpec<Float16Type>, ArgSpec<IntType>], "LIBC_TYPES_HAS_FLOAT16">,
536535
GuardedFunctionSpec<"ldexpf128", RetValSpec<Float128Type>, [ArgSpec<Float128Type>, ArgSpec<IntType>], "LIBC_TYPES_HAS_FLOAT128">,
537536

538537
FunctionSpec<"log10", RetValSpec<DoubleType>, [ArgSpec<DoubleType>]>,

libc/src/__support/FPUtil/ManipulationFunctions.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ LIBC_INLINE constexpr T ldexp(T x, int exp) {
186186
}
187187

188188
// For all other values, NormalFloat to T conversion handles it the right way.
189-
DyadicFloat<cpp::max(FPBits<T>::STORAGE_LEN, 32)> normal(bits.get_val());
189+
DyadicFloat<FPBits<T>::STORAGE_LEN> normal(bits.get_val());
190190
normal.exponent += exp;
191191
return static_cast<T>(normal);
192192
}

libc/src/__support/FPUtil/dyadic_float.h

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
#include "src/__support/CPP/type_traits.h"
1515
#include "src/__support/big_int.h"
1616
#include "src/__support/macros/optimization.h" // LIBC_UNLIKELY
17-
#include "src/__support/macros/properties/types.h" // float16
1817

1918
#include <stddef.h>
2019

@@ -184,10 +183,6 @@ template <size_t Bits> struct DyadicFloat {
184183
return r;
185184
}
186185

187-
LIBC_INLINE explicit constexpr operator float16() const {
188-
return static_cast<float16>(static_cast<float>(*this));
189-
}
190-
191186
LIBC_INLINE explicit constexpr operator MantissaType() const {
192187
if (mantissa.is_zero())
193188
return 0;

libc/src/math/CMakeLists.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,6 @@ add_math_entrypoint_object(llogbf128)
224224
add_math_entrypoint_object(ldexp)
225225
add_math_entrypoint_object(ldexpf)
226226
add_math_entrypoint_object(ldexpl)
227-
add_math_entrypoint_object(ldexpf16)
228227
add_math_entrypoint_object(ldexpf128)
229228

230229
add_math_entrypoint_object(log10)

libc/src/math/generic/CMakeLists.txt

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1487,19 +1487,6 @@ add_entrypoint_object(
14871487
libc.src.__support.FPUtil.manipulation_functions
14881488
)
14891489

1490-
add_entrypoint_object(
1491-
ldexpf16
1492-
SRCS
1493-
ldexpf16.cpp
1494-
HDRS
1495-
../ldexpf16.h
1496-
COMPILE_OPTIONS
1497-
-O0 -ggdb3
1498-
DEPENDS
1499-
libc.src.__support.macros.properties.types
1500-
libc.src.__support.FPUtil.manipulation_functions
1501-
)
1502-
15031490
add_entrypoint_object(
15041491
ldexpf128
15051492
SRCS

libc/src/math/generic/ldexpf16.cpp

Lines changed: 0 additions & 19 deletions
This file was deleted.

libc/src/math/ldexpf16.h

Lines changed: 0 additions & 20 deletions
This file was deleted.

0 commit comments

Comments
 (0)