jax.numpy.frexp#

jax.numpy.frexp(x)[source]#

Decompose the elements of x into mantissa and twos exponent.

LAX-backend implementation of numpy.frexp().

Original docstring below.

Returns (mantissa, exponent), where x = mantissa * 2**exponent. The mantissa lies in the open interval(-1, 1), while the twos exponent is a signed integer.

Parameters

x (array_like) – Array of numbers to be decomposed.

Return type

Tuple[Array, Array]

Returns

  • mantissa (ndarray) – Floating values between -1 and 1. This is a scalar if x is a scalar.

  • exponent (ndarray) – Integer exponents of 2. This is a scalar if x is a scalar.