Name
f-trunc:floating_misc — ordinary primitive
Synopsis
FORTH
FTRUNC
(f: x -- x' )(
)
;
p4:"f-trunc";
Description
truncate towards zero, discard a fractional part. See also FTRUNC>S
conversion and the FROUND and FLOOR adaptors.
: FTRUNC FDUP F0< IF FCEIL ELSE FLOOR THEN ;
(When available, uses a single call to C99 trunc() internally)