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
| Name | Type | Description |
|---|---|---|
| x | real number | Input real value. |
| i | int | Base-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))