12.6.2.1471 F>S F to S FLOATING EXT

( -- n ) ( F: r -- ) or ( r -- n )

n is the single-cell signed-integer equivalent of the integer portion of r. The fractional portion of r is discarded. An ambiguous condition exists if the integer portion of r cannot be represented as a single-cell signed integer.

Note:

Rounding the floating-point value prior to calling F>S is advised, because F>S rounds towards zero.

See:

Implementation:

: F>S ( r -- n )
   F>D D>S
;

ContributeContributions

AntonErtlavatar of AntonErtl [255] PronounciationComment2022-08-15 13:48:50

In keeping with the style of other pronounciations (e.g., for s>d), the pronounciation for f>s should be "f-to-s".

Reply New Version