Runtime
Environment
-
Floating-Point
Support
5.7.4
Conversion
Functions
Assume that:
• f and d
are
single-precision or double-precision floating-point values
on the stack,
• i
is
an
integer that
is
passed
in
AS,
and
• u
is
an
unsigned integer that
is
passed in
AS.
Function
FD$DTOF
FD$DTOI
FD$DTOU
FD$FTOD
FD$FTOI
FD$FTOU
FD$UTOD
FD$ITOD
FO$UTOF
FD$ITOF
Action
Convert d
to
single precision and return on stack.
Convert d
to
a signed integer and return in
AS.
Convert d
to
an
unsigned integer and return in
AS.
Convert f
to
double precision and return on stack.
Convert f
to
a signed integer and return
in
AS.
Convert f
to
an
unsigned integer and return in
AS.
Convert u
to
double precision and return on stack.
Convert i
to
double precision and return on stack.
Convert u
to
single precision and return on the stack.
Convert i
to
single precision and return on the stack.
5.7.5
Floating-Point
Errors
You
can
customize this function
in
any way you wish; write your own function
and
use
the archiver
to
include the function into the floating-point library.
Function
Action
-fp-error
Called whenever a floating-point exception occurs.
5-21