mathLib.frexp

The system function mathLib.frexp splits a number into a normalized fraction in the range of .5 to 1 (which is returned as the result) and a power of 2 (which is returned in integer).


mathLib.frexp syntax diagram

result

Any numeric or HEX item, as described in Mathematical (system words). The floating-point fraction is converted to the format of result and returned in result.

numericItem

Any numeric or HEX item, as described in Mathematical (system words). The item is converted to double-precision floating-point before result is calculated.

integer

Item defined as type INT or the following equivalent: type BIN with length 9 and no decimal places.

Example

  result = mathLib.frexp(myItem,myInteger);

Related reference
Mathematical (system words)