20 changes: 20 additions & 0 deletions libc/src/math/scalblnf.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
//===-- Implementation header for scalblnf ----------------------*- 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_SCALBLNF_H
#define LLVM_LIBC_SRC_MATH_SCALBLNF_H

#include "src/__support/macros/config.h"

namespace LIBC_NAMESPACE_DECL {

float scalblnf(float x, long n);

} // namespace LIBC_NAMESPACE_DECL

#endif // LLVM_LIBC_SRC_MATH_SCALBLNF_H
21 changes: 21 additions & 0 deletions libc/src/math/scalblnf128.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
//===-- Implementation header for scalblnf128 -------------------*- 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_SCALBLNF128_H
#define LLVM_LIBC_SRC_MATH_SCALBLNF128_H

#include "src/__support/macros/config.h"
#include "src/__support/macros/properties/types.h"

namespace LIBC_NAMESPACE_DECL {

float128 scalblnf128(float128 x, long n);

} // namespace LIBC_NAMESPACE_DECL

#endif // LLVM_LIBC_SRC_MATH_SCALBLNF128_H
20 changes: 20 additions & 0 deletions libc/src/math/scalblnl.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
//===-- Implementation header for scalblnl ----------------------*- 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_SCALBLNL_H
#define LLVM_LIBC_SRC_MATH_SCALBLNL_H

#include "src/__support/macros/config.h"

namespace LIBC_NAMESPACE_DECL {

long double scalblnl(long double x, long n);

} // namespace LIBC_NAMESPACE_DECL

#endif // LLVM_LIBC_SRC_MATH_SCALBLNL_H
72 changes: 72 additions & 0 deletions libc/test/src/math/smoke/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3630,6 +3630,51 @@ add_fp_unittest(
libc.src.math.atan2
)

add_fp_unittest(
scalbln_test
SUITE
libc-math-smoke-tests
SRCS
scalbln_test.cpp
HDRS
ScalbnTest.h
DEPENDS
libc.src.math.scalbln
libc.src.__support.CPP.limits
libc.src.__support.FPUtil.fp_bits
libc.src.__support.FPUtil.normal_float
)

add_fp_unittest(
scalblnf_test
SUITE
libc-math-smoke-tests
SRCS
scalblnf_test.cpp
HDRS
ScalbnTest.h
DEPENDS
libc.src.math.scalblnf
libc.src.__support.CPP.limits
libc.src.__support.FPUtil.fp_bits
libc.src.__support.FPUtil.normal_float
)

add_fp_unittest(
scalblnl_test
SUITE
libc-math-smoke-tests
SRCS
scalblnl_test.cpp
HDRS
ScalbnTest.h
DEPENDS
libc.src.math.scalblnl
libc.src.__support.CPP.limits
libc.src.__support.FPUtil.fp_bits
libc.src.__support.FPUtil.normal_float
)

add_fp_unittest(
scalblnf16_test
SUITE
Expand All @@ -3640,7 +3685,24 @@ add_fp_unittest(
ScalbnTest.h
DEPENDS
libc.src.math.scalblnf16
libc.src.__support.CPP.limits
libc.src.__support.FPUtil.fp_bits
libc.src.__support.FPUtil.normal_float
)

add_fp_unittest(
scalblnf128_test
SUITE
libc-math-smoke-tests
SRCS
scalblnf128_test.cpp
HDRS
ScalbnTest.h
DEPENDS
libc.src.math.scalblnf128
libc.src.__support.CPP.limits
libc.src.__support.FPUtil.fp_bits
libc.src.__support.FPUtil.normal_float
)

add_fp_unittest(
Expand All @@ -3653,7 +3715,9 @@ add_fp_unittest(
ScalbnTest.h
DEPENDS
libc.src.math.scalbn
libc.src.__support.CPP.limits
libc.src.__support.FPUtil.fp_bits
libc.src.__support.FPUtil.normal_float
)

add_fp_unittest(
Expand All @@ -3666,7 +3730,9 @@ add_fp_unittest(
ScalbnTest.h
DEPENDS
libc.src.math.scalbnf
libc.src.__support.CPP.limits
libc.src.__support.FPUtil.fp_bits
libc.src.__support.FPUtil.normal_float
)

add_fp_unittest(
Expand All @@ -3679,7 +3745,9 @@ add_fp_unittest(
ScalbnTest.h
DEPENDS
libc.src.math.scalbnl
libc.src.__support.CPP.limits
libc.src.__support.FPUtil.fp_bits
libc.src.__support.FPUtil.normal_float
)

add_fp_unittest(
Expand All @@ -3692,7 +3760,9 @@ add_fp_unittest(
ScalbnTest.h
DEPENDS
libc.src.math.scalbnf16
libc.src.__support.CPP.limits
libc.src.__support.FPUtil.fp_bits
libc.src.__support.FPUtil.normal_float
)

add_fp_unittest(
Expand All @@ -3705,7 +3775,9 @@ add_fp_unittest(
ScalbnTest.h
DEPENDS
libc.src.math.scalbnf128
libc.src.__support.CPP.limits
libc.src.__support.FPUtil.fp_bits
libc.src.__support.FPUtil.normal_float
)

add_fp_unittest(
Expand Down
13 changes: 13 additions & 0 deletions libc/test/src/math/smoke/scalbln_test.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
//===-- Unittests for scalbln ---------------------------------------------===//
//
// 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 "ScalbnTest.h"

#include "src/math/scalbln.h"

LIST_SCALBN_TESTS(double, long, LIBC_NAMESPACE::scalbln)
13 changes: 13 additions & 0 deletions libc/test/src/math/smoke/scalblnf128_test.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
//===-- Unittests for scalblnf128 -----------------------------------------===//
//
// 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 "ScalbnTest.h"

#include "src/math/scalblnf128.h"

LIST_SCALBN_TESTS(float128, long, LIBC_NAMESPACE::scalblnf128)
13 changes: 13 additions & 0 deletions libc/test/src/math/smoke/scalblnf_test.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
//===-- Unittests for scalblnf --------------------------------------------===//
//
// 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 "ScalbnTest.h"

#include "src/math/scalblnf.h"

LIST_SCALBN_TESTS(float, long, LIBC_NAMESPACE::scalblnf)
13 changes: 13 additions & 0 deletions libc/test/src/math/smoke/scalblnl_test.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
//===-- Unittests for scalblnl --------------------------------------------===//
//
// 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 "ScalbnTest.h"

#include "src/math/scalblnl.h"

LIST_SCALBN_TESTS(long double, long, LIBC_NAMESPACE::scalblnl)