Posted inmath
How to extract mantissa and exponent using math.frexp in Python
frexp returns a mantissa in the range [-1, -0.5] or [0.5, 1), with an integer exponent scaling by powers of two. It supports positive, negative, and zero inputs, reconstructing the original number as mantissa × 2^exponent. Useful for floating-point arithmetic and bit-level operations in Python.
