Builtin Library
README.md
math.frexp (procNode)
A value split into a mantissa and a power of 2, element by element: a is mantissa * 2 ^ exponent, with the mantissa from 0.5 up to 1 in size and the sign of a, and the exponent a whole number. A value of 0 answers 0 and 0.
Built from the operations of proc.fieldc.operators that answer each output. Operands are numbers, vectors, Columns or Fields. When every operand is a plain number or vector the answer is the plain result, folded where the node cooks; otherwise the answer is a Field: a template over its operands that whatever reads it evaluates in one dispatch together with the chain around it. Nothing dispatches for this node alone. Over numbers and animated values the answer is an animated value: the operation at every time.
It calls the frexp_mantissa and frexp_exponent operations.
Inputs
a(Value, default 0). The value.
Outputs
mantissa. The fraction of the value, from 0.5 up to 1 in size.exponent. The whole power of 2 the mantissa is multiplied by.
local mantissa, exponent = g.math.frexp(8) -- 0.5, 4