modf()

The system function MathLib.modf splits a number into integral and fractional parts, both with the same sign as the number. The fractional part is returned in result and the integral part is returned in numericField2.

  MathLib.modf(
    numericField1 mathLibNumber in,     
    numericField2 mathLibNumber inOut)
  returns (result mathLibTypeDependentResult) 
result
Any numeric or HEX item, as described in Mathematical (system words). The fractional part of numericField1 is converted to the format of result and returned in result.
numericField1
Any numeric or HEX item, as described in Mathematical (system words).
numericField2
Any numeric or HEX item, as described in Mathematical (system words). The integral part of numericField1 is converted to the format of numericField2 and returned in numericField2.

Example

  result = MathLib.modf(myItem01,myItem02);

Related reference
EGL library MathLib

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