Math Functions

math.ldexp()

Scale a real value by two raised to an integer exponent, without explicitly constructing that power.

Formal Syntax & Structure

python syntaxpython
math.ldexp(x, i, /)

Parameters & Attributes

NameTypeDescription
xreal numberInput real value.
iintBase-two exponent.

Return Value

float

Floating-point result; finite precision and domain restrictions apply.

Working Example

Example Snippetpython
import mathprint(math.ldexp(0.75, 4))
Python Reference