2 * Copyright (c) 2005-2020 Rich Felker, et al.
4 * SPDX-License-Identifier: MIT
6 * Please see https://git.musl-libc.org/cgit/musl/tree/COPYRIGHT
7 * for all contributors to musl.
11 #include "math_private.h"
14 * scalbnl (long double x, int n)
15 * scalbnl(x,n) returns x* 2**n computed by exponent
16 * manipulation rather than by actually performing an
17 * exponentiation or a multiplication.
19 #if (LDBL_MANT_DIG == 64 || LDBL_MANT_DIG == 113) && LDBL_MAX_EXP == 16384
20 long double scalbnl(long double x
, int n
)
33 } else if (n
< -16382) {
34 x
*= 0x1p
-16382L * 0x1p
113L;
37 x
*= 0x1p
-16382L * 0x1p
113L;
44 u
.xbits
.expsign
= 0x3fff + n
;
47 __strong_reference(scalbnl
, ldexpl
);