scalbn

Efficiently calculates x * 2n.

scalbn handles underflow and overflow in the same fashion as the basic arithmetic operators.

Special Values
xscalb(x)
$(PLUSMNINF)$(PLUSMNINF)
±0.0±0.0
@safe pure nothrow @nogc
real
scalbn
(
real x
,
int n
)

Examples

assert(scalbn(0x1.2345678abcdefp0, 999) == 0x1.2345678abcdefp999);
assert(scalbn(-real.infinity, 5) == -real.infinity);

Meta

Suggestion Box / Bug Report