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 exponent).

  MathLib.frexp(
    numericField mathLibNumber in,
    exponent mathLibInteger inOut)
  returns (result mathLibTypeDependentResult)
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.
numericField
Any numeric or HEX item, as described in Mathematical (system words). The item is converted to double-precision floating-point before result is calculated.
exponent
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
EGL library MathLib

Feedback
(C) Copyright IBM Corporation 2000, 2005. All Rights Reserved.