On this page
  1. math.frexp
  2. Import
  3. Signature & Overview
  4. Usage
  5. Gotchas
  6. REPL Inspect

math.frexp

Prev: math.fmod | Up: math | Next: math.fsum
Rel: math.acos, math.acosh, math.asin, math.asinh
Ref: docs.python.org — math.frexp
Tags: #public #python3 #stdlib #math


Import

import math
from math import frexp

Signature & Overview

math.frexp(x, /)

Return the mantissa and exponent of x, as pair (m, e).

Usage

import math

m, e = math.frexp(12.0)
assert m == 0.75 and e == 4 and m * (2 ** e) == 12.0

Gotchas

REPL Inspect

from math import frexp
help(frexp)

Linked from

Related notes