Split values into a normalized mantissa and a power of two exponent.
Numeric.math.frexp(value)Decomposes each value into fraction and power.
- Parameters:
value: Scalar, vector, or matrix of input values
- Returns: Mantissa and exponent for each input value
- NumPy: Equivalent to
np.frexp.
import Numeric from '@neabyte/numerix'
const parts = Numeric.math.frexp(12)
console.log(parts)
// [0.75,4]import Numeric from '@neabyte/numerix'
const parts = Numeric.math.frexp([12, 8])
console.log(parts)
// [[0.75,0.5],[4,4]]import Numeric from '@neabyte/numerix'
const parts = Numeric.math.frexp(-12)
console.log(parts)
// [-0.75,4]import Numeric from '@neabyte/numerix'
const parts = Numeric.math.frexp(0)
console.log(parts)
// [0,0]