CRE Programmer's Guide
Math Functions
Common Run-Time Environment (CRE) Programmer’s Guide—528146-004
7-20
Split
Split
The Split function separates a 64-bit floating-point number into integral and fractional
parts.
number
is the number to separate into an integral and fractional part.
integral_part
is a reference parameter into which Split stores the integral part of number.
Return Value
Split returns the fractional part of number.
Example
REAL(64) r;
REAL(64) s;
r := RTL_Split_Real64_(1.6L0, s); ! r gets 0.6L0
! s gets 1.0L0
r := RTL_Split_Real64_(-2.7L0, s); ! r gets -0.7L0
! s gets -2.0L0
Sqrt
The Sqrt functions return the square root of a number.
number
is the number whose square root is returned.
Return Value
The Sqrt functions return the square root of number.
REAL(64) PROC RTL_Split_Real64_(number,integral_part);
REAL(64) number; ! in
REAL(64) .EXT integral_part; ! out TNS only
REAL(32) PROC { CRE_Sqrt_Real32_ } ( number );
{ RTL_Sqrt_Real32_ }
REAL(32) number; ! TNS only
REAL(64) PROC { CRE_Sqrt_Real64_ } ( number );
{ RTL_Sqrt_Real64_ }
REAL(64) number; ! TNS only