1//===-- Implementation header for scalblnf128 -------------------*- C++ -*-===//
2//
3// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4// See https://llvm.org/LICENSE.txt for license information.
5// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6//
7//===----------------------------------------------------------------------===//
8
9#ifndef LLVM_LIBC_SRC___SUPPORT_MATH_SCALBLNF128_H
10#define LLVM_LIBC_SRC___SUPPORT_MATH_SCALBLNF128_H
11
12#include "include/llvm-libc-types/float128.h"
13
14#ifdef LIBC_TYPES_HAS_FLOAT128
15
16#include "hdr/float_macros.h"
17#include "src/__support/FPUtil/ManipulationFunctions.h"
18#include "src/__support/macros/config.h"
19
20#if FLT_RADIX != 2
21#error "FLT_RADIX != 2 is not supported."
22#endif
23
24namespace LIBC_NAMESPACE_DECL {
25namespace math {
26
27LIBC_INLINE constexpr float128 scalblnf128(float128 x, long n) {
28 return fputil::ldexp(x, exp: n);
29}
30
31} // namespace math
32} // namespace LIBC_NAMESPACE_DECL
33
34#endif // LIBC_TYPES_HAS_FLOAT128
35
36#endif // LLVM_LIBC_SRC___SUPPORT_MATH_SCALBLNF128_H
37