ldexp

Efficiently calculates 2 * 10n. $(BOOKTABLE,

InvalidOperationExceptionx is signaling NaN

$(TR

UnderflowExceptionresult is subnormal or too small to be represented

$(TR

OverflowExceptionresult is too big to be representedInexactExceptionresult is inexact
More...
D
ldexp
(
D
)
(
auto const ref D x
,
const int n
)

Detailed Description

Special values

xnldexp(x, n)
NaNanyNaN
±∞any±∞
±0any±0
any0x

Examples

decimal32 d = "1.0";
assert (ldexp(d, 3) == 8);

Meta