15e9937d1SMichael Flanders //===-- Implementation of scalbnf128 function -----------------------------===// 25e9937d1SMichael Flanders // 35e9937d1SMichael Flanders // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 45e9937d1SMichael Flanders // See https://llvm.org/LICENSE.txt for license information. 55e9937d1SMichael Flanders // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 65e9937d1SMichael Flanders // 75e9937d1SMichael Flanders //===----------------------------------------------------------------------===// 85e9937d1SMichael Flanders 95e9937d1SMichael Flanders #include "src/math/scalbnf128.h" 104486fcbaSlntue #include "hdr/float_macros.h" 115e9937d1SMichael Flanders #include "src/__support/FPUtil/ManipulationFunctions.h" 125e9937d1SMichael Flanders #include "src/__support/common.h" 13*5ff3ff33SPetr Hosek #include "src/__support/macros/config.h" 145e9937d1SMichael Flanders 154486fcbaSlntue #if FLT_RADIX != 2 164486fcbaSlntue #error "FLT_RADIX != 2 is not supported." 174486fcbaSlntue #endif 184486fcbaSlntue 19*5ff3ff33SPetr Hosek namespace LIBC_NAMESPACE_DECL { 205e9937d1SMichael Flanders 215e9937d1SMichael Flanders LLVM_LIBC_FUNCTION(float128, scalbnf128, (float128 x, int n)) { 225e9937d1SMichael Flanders return fputil::ldexp(x, n); 235e9937d1SMichael Flanders } 245e9937d1SMichael Flanders 25*5ff3ff33SPetr Hosek } // namespace LIBC_NAMESPACE_DECL 26