diff --git a/libc/config/linux/aarch64/entrypoints.txt b/libc/config/linux/aarch64/entrypoints.txt --- a/libc/config/linux/aarch64/entrypoints.txt +++ b/libc/config/linux/aarch64/entrypoints.txt @@ -220,7 +220,6 @@ # math.h entrypoints libc.src.math.acosf libc.src.math.acoshf - libc.src.math.asin libc.src.math.asinf libc.src.math.asinhf libc.src.math.atanf @@ -296,7 +295,6 @@ libc.src.math.nextafter libc.src.math.nextafterf libc.src.math.nextafterl - libc.src.math.pow libc.src.math.remainderf libc.src.math.remainder libc.src.math.remainderl diff --git a/libc/config/linux/riscv64/entrypoints.txt b/libc/config/linux/riscv64/entrypoints.txt --- a/libc/config/linux/riscv64/entrypoints.txt +++ b/libc/config/linux/riscv64/entrypoints.txt @@ -227,7 +227,6 @@ # math.h entrypoints libc.src.math.acosf libc.src.math.acoshf - libc.src.math.asin libc.src.math.asinf libc.src.math.asinhf libc.src.math.atanf @@ -302,7 +301,6 @@ libc.src.math.nextafter libc.src.math.nextafterf libc.src.math.nextafterl - libc.src.math.pow libc.src.math.remainderf libc.src.math.remainder libc.src.math.remainderl diff --git a/libc/config/linux/x86_64/entrypoints.txt b/libc/config/linux/x86_64/entrypoints.txt --- a/libc/config/linux/x86_64/entrypoints.txt +++ b/libc/config/linux/x86_64/entrypoints.txt @@ -227,7 +227,6 @@ # math.h entrypoints libc.src.math.acosf libc.src.math.acoshf - libc.src.math.asin libc.src.math.asinf libc.src.math.asinhf libc.src.math.atanf @@ -304,7 +303,6 @@ libc.src.math.nextafter libc.src.math.nextafterf libc.src.math.nextafterl - libc.src.math.pow libc.src.math.remainderf libc.src.math.remainder libc.src.math.remainderl diff --git a/libc/config/windows/entrypoints.txt b/libc/config/windows/entrypoints.txt --- a/libc/config/windows/entrypoints.txt +++ b/libc/config/windows/entrypoints.txt @@ -114,7 +114,6 @@ # math.h entrypoints libc.src.math.acosf libc.src.math.acoshf - libc.src.math.asin libc.src.math.asinf libc.src.math.asinhf libc.src.math.atanf @@ -191,7 +190,6 @@ libc.src.math.nextafter libc.src.math.nextafterf libc.src.math.nextafterl - libc.src.math.pow libc.src.math.remainderf libc.src.math.remainder libc.src.math.remainderl diff --git a/libc/src/math/CMakeLists.txt b/libc/src/math/CMakeLists.txt --- a/libc/src/math/CMakeLists.txt +++ b/libc/src/math/CMakeLists.txt @@ -43,7 +43,6 @@ add_math_entrypoint_object(acosf) add_math_entrypoint_object(acoshf) -add_math_entrypoint_object(asin) add_math_entrypoint_object(asinf) add_math_entrypoint_object(asinhf) @@ -153,8 +152,6 @@ add_math_entrypoint_object(nextafterf) add_math_entrypoint_object(nextafterl) -add_math_entrypoint_object(pow) - add_math_entrypoint_object(remainder) add_math_entrypoint_object(remainderf) add_math_entrypoint_object(remainderl) diff --git a/libc/src/math/asin.h b/libc/src/math/asin.h deleted file mode 100644 --- a/libc/src/math/asin.h +++ /dev/null @@ -1,18 +0,0 @@ -//===-- Implementation header for asin --------------------------*- C++ -*-===// -// -// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. -// See https://llvm.org/LICENSE.txt for license information. -// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_LIBC_SRC_MATH_ASIN_H -#define LLVM_LIBC_SRC_MATH_ASIN_H - -namespace __llvm_libc { - -double asin(double x); - -} // namespace __llvm_libc - -#endif // LLVM_LIBC_SRC_MATH_ASIN_H diff --git a/libc/src/math/generic/CMakeLists.txt b/libc/src/math/generic/CMakeLists.txt --- a/libc/src/math/generic/CMakeLists.txt +++ b/libc/src/math/generic/CMakeLists.txt @@ -1383,18 +1383,6 @@ -O3 ) -add_entrypoint_object( - asin - SRCS - asin.cpp - HDRS - ../asin.h - DEPENDS - .asinf - COMPILE_OPTIONS - -O3 -) - add_entrypoint_object( acosf SRCS @@ -1428,19 +1416,6 @@ -O3 ) -add_entrypoint_object( - pow - SRCS - pow.cpp - HDRS - ../pow.h - DEPENDS - .expf - .logf - COMPILE_OPTIONS - -O3 -) - add_entrypoint_object( scalbn SRCS diff --git a/libc/src/math/generic/asin.cpp b/libc/src/math/generic/asin.cpp deleted file mode 100644 --- a/libc/src/math/generic/asin.cpp +++ /dev/null @@ -1,22 +0,0 @@ -//===-- Double-precision asin function ------------------------------------===// -// -// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. -// See https://llvm.org/LICENSE.txt for license information. -// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception -// -//===----------------------------------------------------------------------===// - -#include "src/math/asin.h" -#include "src/math/asinf.h" - -#include "src/__support/common.h" - -namespace __llvm_libc { - -LLVM_LIBC_FUNCTION(double, asin, (double x)) { - // Place-holder implementation for double precision asin function. - // TODO: Implement correctly rounded asin function for double precision. - return static_cast(asinf(static_cast(x))); -} - -} // namespace __llvm_libc diff --git a/libc/src/math/generic/pow.cpp b/libc/src/math/generic/pow.cpp deleted file mode 100644 --- a/libc/src/math/generic/pow.cpp +++ /dev/null @@ -1,24 +0,0 @@ -//===-- Implementation of pow function ------------------------------------===// -// -// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. -// See https://llvm.org/LICENSE.txt for license information. -// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception -// -//===----------------------------------------------------------------------===// - -#include "src/math/pow.h" -#include "src/math/expf.h" -#include "src/math/logf.h" - -#include "src/__support/common.h" - -namespace __llvm_libc { - -LLVM_LIBC_FUNCTION(double, pow, (double x, double y)) { - // Place-holder implementation for double precision pow function. - // TODO: Implement correctly rounded pow function for double precision. - return static_cast( - expf(static_cast(y) * logf(static_cast(x)))); -} - -} // namespace __llvm_libc diff --git a/libc/src/math/pow.h b/libc/src/math/pow.h deleted file mode 100644 --- a/libc/src/math/pow.h +++ /dev/null @@ -1,18 +0,0 @@ -//===-- Implementation header for pow ---------------------------*- C++ -*-===// -// -// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. -// See https://llvm.org/LICENSE.txt for license information. -// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_LIBC_SRC_MATH_POW_H -#define LLVM_LIBC_SRC_MATH_POW_H - -namespace __llvm_libc { - -double pow(double x, double y); - -} // namespace __llvm_libc - -#endif // LLVM_LIBC_SRC_MATH_POW_H diff --git a/libc/test/src/math/CMakeLists.txt b/libc/test/src/math/CMakeLists.txt --- a/libc/test/src/math/CMakeLists.txt +++ b/libc/test/src/math/CMakeLists.txt @@ -1482,18 +1482,6 @@ libc.src.__support.FPUtil.fp_bits ) -add_fp_unittest( - asin_test - NEED_MPFR - SUITE - libc_math_unittests - SRCS - asin_test.cpp - DEPENDS - libc.src.errno.errno - libc.src.math.asin -) - add_fp_unittest( acosf_test NEED_MPFR @@ -1534,18 +1522,6 @@ libc.src.__support.FPUtil.fp_bits ) -add_fp_unittest( - pow_test - NEED_MPFR - SUITE - libc_math_unittests - SRCS - pow_test.cpp - DEPENDS - libc.src.errno.errno - libc.src.math.pow -) - add_fp_unittest( scalbn_test NEED_MPFR diff --git a/libc/test/src/math/asin_test.cpp b/libc/test/src/math/asin_test.cpp deleted file mode 100644 --- a/libc/test/src/math/asin_test.cpp +++ /dev/null @@ -1,42 +0,0 @@ -//===-- Unittests for asin ------------------------------------------------===// -// -// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. -// See https://llvm.org/LICENSE.txt for license information. -// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception -// -//===----------------------------------------------------------------------===// - -#include "src/errno/libc_errno.h" -#include "src/math/asin.h" -#include "test/UnitTest/FPMatcher.h" -#include "test/UnitTest/Test.h" -#include "utils/MPFRWrapper/MPFRUtils.h" -#include - -#include -#include - -using FPBits = __llvm_libc::fputil::FPBits; - -namespace mpfr = __llvm_libc::testing::mpfr; - -DECLARE_SPECIAL_CONSTANTS(double) - -TEST(LlvmLibcAsinTest, SpecialNumbers) { - libc_errno = 0; - - EXPECT_FP_EQ(aNaN, __llvm_libc::asin(aNaN)); - EXPECT_MATH_ERRNO(0); - - EXPECT_FP_EQ(0.0, __llvm_libc::asin(0.0)); - EXPECT_MATH_ERRNO(0); - - EXPECT_FP_EQ(-0.0, __llvm_libc::asin(-0.0)); - EXPECT_MATH_ERRNO(0); - - EXPECT_FP_EQ(aNaN, __llvm_libc::asin(inf)); - EXPECT_MATH_ERRNO(EDOM); - - EXPECT_FP_EQ(aNaN, __llvm_libc::asin(neg_inf)); - EXPECT_MATH_ERRNO(EDOM); -} diff --git a/libc/test/src/math/pow_test.cpp b/libc/test/src/math/pow_test.cpp deleted file mode 100644 --- a/libc/test/src/math/pow_test.cpp +++ /dev/null @@ -1,38 +0,0 @@ -//===-- Unittests for pow -------------------------------------------------===// -// -// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. -// See https://llvm.org/LICENSE.txt for license information. -// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception -// -//===----------------------------------------------------------------------===// - -#include "src/errno/libc_errno.h" -#include "src/math/pow.h" -#include "test/UnitTest/FPMatcher.h" -#include "test/UnitTest/Test.h" -#include "utils/MPFRWrapper/MPFRUtils.h" -#include - -#include -#include - -using FPBits = __llvm_libc::fputil::FPBits; - -namespace mpfr = __llvm_libc::testing::mpfr; - -DECLARE_SPECIAL_CONSTANTS(double) - -TEST(LlvmLibcAsinTest, SpecialNumbers) { - libc_errno = 0; - - EXPECT_FP_EQ(aNaN, __llvm_libc::pow(aNaN, aNaN)); - EXPECT_MATH_ERRNO(0); - - EXPECT_FP_EQ(1.0, __llvm_libc::pow(1.0, 1.0)); - EXPECT_MATH_ERRNO(0); - - EXPECT_FP_EQ(1.0, __llvm_libc::pow(1.0, 2.0)); - EXPECT_MATH_ERRNO(0); - - EXPECT_FP_EQ(inf, __llvm_libc::pow(2.0, inf)); -}