The mathLib.modf() system function splits a number into an integer and a fraction, both with the same sign as the original number. The fraction is returned in result and the integer is returned in numericVariable2.
mathLib.modf(
numericVariable1 FLOAT in,
numericVariable2 SMALLINT | INT | BIGINT out)
returns (result FLOAT)
y INT;
x, result SMALLFLOAT;
x = 23.5678;
result = mathLib.modf(x,y);
writeStdOut(result);
writeStdOut(y);
// result = .5678, y=23