Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions libc/shared/math.h
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,14 @@
#include "math/exp2.h"
#include "math/exp2f.h"
#include "math/exp2f16.h"
#include "math/exp2m1f.h"
#include "math/exp2m1f16.h"
#include "math/expf.h"
#include "math/expf16.h"
#include "math/expm1.h"
#include "math/expm1f.h"
#include "math/expm1f16.h"
#include "math/fma.h"
#include "math/frexpf.h"
#include "math/frexpf128.h"
#include "math/frexpf16.h"
Expand Down
23 changes: 23 additions & 0 deletions libc/shared/math/exp2m1f.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
//===-- Shared exp2m1f function ---------------------------------*- 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_SHARED_MATH_EXP2M1F_H
#define LLVM_LIBC_SHARED_MATH_EXP2M1F_H

#include "shared/libc_common.h"
#include "src/__support/math/exp2m1f.h"

namespace LIBC_NAMESPACE_DECL {
namespace shared {

using math::exp2m1f;

} // namespace shared
} // namespace LIBC_NAMESPACE_DECL

#endif // LLVM_LIBC_SHARED_MATH_EXP2M1F_H
29 changes: 29 additions & 0 deletions libc/shared/math/exp2m1f16.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
//===-- Shared exp2m1f16 function -------------------------------*- 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_SHARED_MATH_EXP2M1F16_H
#define LLVM_LIBC_SHARED_MATH_EXP2M1F16_H

#include "include/llvm-libc-macros/float16-macros.h"
#include "shared/libc_common.h"

#ifdef LIBC_TYPES_HAS_FLOAT16

#include "src/__support/math/exp2m1f16.h"

namespace LIBC_NAMESPACE_DECL {
namespace shared {

using math::exp2m1f16;

} // namespace shared
} // namespace LIBC_NAMESPACE_DECL

#endif // LIBC_TYPES_HAS_FLOAT16

#endif // LLVM_LIBC_SHARED_MATH_EXP2M1F16_H
23 changes: 23 additions & 0 deletions libc/shared/math/expm1.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
//===-- Shared expm1 function -----------------------------------*- 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_SHARED_MATH_EXPM1_H
#define LLVM_LIBC_SHARED_MATH_EXPM1_H

#include "shared/libc_common.h"
#include "src/__support/math/expm1.h"

namespace LIBC_NAMESPACE_DECL {
namespace shared {

using math::expm1;

} // namespace shared
} // namespace LIBC_NAMESPACE_DECL

#endif // LLVM_LIBC_SHARED_MATH_EXPM1_H
23 changes: 23 additions & 0 deletions libc/shared/math/expm1f.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
//===-- Shared expm1f function ----------------------------------*- 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_SHARED_MATH_EXPM1F_H
#define LLVM_LIBC_SHARED_MATH_EXPM1F_H

#include "shared/libc_common.h"
#include "src/__support/math/expm1f.h"

namespace LIBC_NAMESPACE_DECL {
namespace shared {

using math::expm1f;

} // namespace shared
} // namespace LIBC_NAMESPACE_DECL

#endif // LLVM_LIBC_SHARED_MATH_EXPM1F_H
29 changes: 29 additions & 0 deletions libc/shared/math/expm1f16.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
//===-- Shared expm1f16 function --------------------------------*- 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_SHARED_MATH_EXPM1F16_H
#define LLVM_LIBC_SHARED_MATH_EXPM1F16_H

#include "include/llvm-libc-macros/float16-macros.h"
#include "shared/libc_common.h"

#ifdef LIBC_TYPES_HAS_FLOAT16

#include "src/__support/math/expm1f16.h"

namespace LIBC_NAMESPACE_DECL {
namespace shared {

using math::expm1f16;

} // namespace shared
} // namespace LIBC_NAMESPACE_DECL

#endif // LIBC_TYPES_HAS_FLOAT16

#endif // LLVM_LIBC_SHARED_MATH_EXPM1F16_H
23 changes: 23 additions & 0 deletions libc/shared/math/fma.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
//===-- Shared fma function -------------------------------------*- 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_SHARED_MATH_FMA_H
#define LLVM_LIBC_SHARED_MATH_FMA_H

#include "shared/libc_common.h"
#include "src/__support/math/fma.h"

namespace LIBC_NAMESPACE_DECL {
namespace shared {

using math::fma;

} // namespace shared
} // namespace LIBC_NAMESPACE_DECL

#endif // LLVM_LIBC_SHARED_MATH_FMA_H
97 changes: 97 additions & 0 deletions libc/src/__support/math/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -593,6 +593,14 @@ add_header_library(
libc.src.__support.math.exp10_float16_constants
)

add_header_library(
fma
HDRS
fma.h
DEPENDS
libc.src.__support.FPUtil.fma
)

add_header_library(
frexpf128
HDRS
Expand Down Expand Up @@ -751,6 +759,42 @@ add_header_library(
libc.src.__support.macros.optimization
)

add_header_library(
exp2m1f
HDRS
exp2m1f.h
DEPENDS
.exp10f_utils
libc.src.errno.errno
libc.src.__support.common
libc.src.__support.FPUtil.except_value_utils
libc.src.__support.FPUtil.fenv_impl
libc.src.__support.FPUtil.fp_bits
libc.src.__support.FPUtil.multiply_add
libc.src.__support.FPUtil.polyeval
libc.src.__support.FPUtil.rounding_mode
libc.src.__support.macros.optimization
libc.src.__support.macros.properties.cpu_features
)

add_header_library(
exp2m1f16
HDRS
exp2m1f16.h
DEPENDS
.expxf16_utils
libc.src.__support.common
libc.src.__support.FPUtil.cast
libc.src.__support.FPUtil.except_value_utils
libc.src.__support.FPUtil.fenv_impl
libc.src.__support.FPUtil.fp_bits
libc.src.__support.FPUtil.multiply_add
libc.src.__support.FPUtil.polyeval
libc.src.__support.FPUtil.rounding_mode
libc.src.__support.macros.optimization
libc.src.__support.macros.properties.cpu_features
)

add_header_library(
exp10
HDRS
Expand Down Expand Up @@ -834,6 +878,59 @@ add_header_library(
libc.src.__support.macros.properties.cpu_features
)

add_header_library(
expm1
HDRS
expm1.h
DEPENDS
.common_constants
.exp_constants
libc.src.__support.CPP.bit
libc.src.__support.FPUtil.dyadic_float
libc.src.__support.FPUtil.fenv_impl
libc.src.__support.FPUtil.fp_bits
libc.src.__support.FPUtil.multiply_add
libc.src.__support.FPUtil.polyeval
libc.src.__support.FPUtil.rounding_mode
libc.src.__support.FPUtil.triple_double
libc.src.__support.integer_literals
libc.src.__support.macros.optimization
libc.src.errno.errno
)

add_header_library(
expm1f
HDRS
expm1f.h
DEPENDS
.common_constants
libc.src.__support.FPUtil.basic_operations
libc.src.__support.FPUtil.fenv_impl
libc.src.__support.FPUtil.fp_bits
libc.src.__support.FPUtil.multiply_add
libc.src.__support.FPUtil.nearest_integer
libc.src.__support.FPUtil.polyeval
libc.src.__support.FPUtil.rounding_mode
libc.src.__support.macros.optimization
libc.src.errno.errno
)

add_header_library(
expm1f16
HDRS
expm1f16.h
DEPENDS
.expxf16_utils
libc.src.__support.FPUtil.cast
libc.src.__support.FPUtil.except_value_utils
libc.src.__support.FPUtil.fenv_impl
libc.src.__support.FPUtil.fp_bits
libc.src.__support.FPUtil.multiply_add
libc.src.__support.FPUtil.polyeval
libc.src.__support.FPUtil.rounding_mode
libc.src.__support.macros.optimization
)

add_header_library(
range_reduction_double
HDRS
Expand Down
Loading
Loading