Math Functions
math.frexp()
Express a float as a mantissa and a base-two exponent. For finite nonzero inputs the mantissa magnitude is at least 0.5 and below 1.
Formal Syntax & Structure
python syntaxpython
math.frexp(x, /)Parameters & Attributes
| Name | Type | Description |
|---|---|---|
| x | real number | Input real value. |
Return Value
tuple[float, int]
Pair (mantissa, exponent).
Working Example
Example Snippetpython
import mathprint(math.frexp(12))