Die Systemfunktion 'mathLib.modf()' zerlegt eine Zahl in eine ganze Zahl und eine Bruchzahl, beide mit demselben Vorzeichen wie die ursprüngliche Zahl. Die Bruchzahl wird in 'Ergebnis' und die ganze Zahl in 'numerische_Variable2' zurückgegeben.
mathLib.modf(
numerische_Variable1 FLOAT in,
numerische_Variable2 SMALLINT | INT | BIGINT out)
returns (Ergebnis FLOAT)
y INT;
x, result SMALLFLOAT;
x = 23.5678;
result = mathLib.modf(x,y);
writeStdOut(result);
writeStdOut(y);
// Ergebnis = .5678, y=23