- DFALIGN
- DFALIGNED
- DFFIELD:
- DF@
- DFLOAT+
- DFLOATS
- DF!
- D>F
- FABS
- FACOS
- FACOSH
- FALIGN
- FALIGNED
- FALOG
- FASIN
- FASINH
- FATAN
- FATANH
- FATAN2
- FCONSTANT
- FCOS
- FCOSH
- FDEPTH
- FDROP
- FDUP
- F/
- FEXP
- FEXPM1
- FE.
- FFIELD:
- F@
- FLITERAL
- FLN
- FLNP1
- FLOAT+
- FLOATS
- FLOG
- FLOOR
- FMAX
- FMIN
- F-
- FNEGATE
- FOVER
- F+
- FROT
- FROUND
- FSIN
- FSINCOS
- FSINH
- FSQRT
- FSWAP
- FS.
- F!
- FTAN
- FTANH
- FTRUNC
- F*
- F**
- FVALUE
- FVARIABLE
- F0=
- F0<
- F.
- F<
- F~
- F>D
- F>S
- PRECISION
- REPRESENT
- SET-PRECISION
- SFALIGN
- SFALIGNED
- SFFIELD:
- SF@
- SFLOAT+
- SFLOATS
- SF!
- S>F
- >FLOAT
12.6.2.1627 FTRUNC f-trunc FLOATING EXT
( F: r1 -- r2 ) or ( r1 -- r2 )
Round r1 to an integral value using the "round towards zero" rule, giving r2.
See:
Implementation:
Testing:
SET-EXACT
T{ -0E FTRUNC F0= -> <TRUE> }T
T{ -1E-9 FTRUNC F0= -> <TRUE> }T
T{ -0.9E FTRUNC F0= -> <TRUE> }T
T{ -1E 1E-5 F+ FTRUNC F0= -> <TRUE> }T
T{ 0E FTRUNC -> 0E R}T
T{ 1E-9 FTRUNC -> 0E R}T
T{ -1E -1E-5 F+ FTRUNC -> -1E R}T
T{ 3.14E FTRUNC -> 3E R}T
T{ 3.99E FTRUNC -> 3E R}T
T{ 4E FTRUNC -> 4E R}T
T{ -4E FTRUNC -> -4E R}T
T{ -4.1E FTRUNC -> -4E R}T