pfe-floating-misc-ext
Prev? | pfe Forth Wordset List | ?Next

## Name

pfe-floating-misc-ext ? FLOATING-Misc Compatibility words

## Synopsis

`FLIT ?=>? (` | `)`; | ?

`"FORTH"`;
?

`FP@ ( -- addr ) ?=>? (` | `)`; | ?

`"FORTH"`;
?

`FP! ( addr -- ) ?=>? (` | `)`; | ?

`"FORTH"`;
?

`F= ?=>? (` | `)`; | ?

`"FORTH"`;
?

`F<> ( f: a b -- s: a!=b ) ?=>? (` | `)`; | ?

`"FORTH"`;
?

`F> ?=>? (` | `)`; | ?

`"FORTH"`;
?

`F<= ?=>? (` | `)`; | ?

`"FORTH"`;
?

`F>= ?=>? (` | `)`; | ?

`"FORTH"`;
?

`S>F ( n -- f: x ) ?=>? (` | `)`; | ?

`"FORTH"`;
?

`FTRUNC>S (f: x -- s: n ) ?=>? (` | `)`; | ?

`"FORTH"`;
?

`FROUND>S (f: x -- s: n) ?=>? (` | `)`; | ?

`"FORTH"`;
?

`FTRUNC (f: x -- x' ) ?=>? (` | `)`; | ?

`"FORTH"`;
?

`-FROT (f: x1 x2 x3 -- x3 x1 x2 ) ?=>? (` | `)`; | ?

`"FORTH"`;
?

`FNIP (f: x1 x2 -- x2 ) ?=>? (` | `)`; | ?

`"FORTH"`;
?

`FTUCK (f: x1 x2 -- x2 x1 x2 ) ?=>? (` | `)`; | ?

`"FORTH"`;
?

`1/F (f: x -- 1/x ) ?=>? (` | `)`; | ?

`"FORTH"`;
?

`F^2 (f: x -- x^2 ) ?=>? (` | `)`; | ?

`"FORTH"`;
?

`F^N ( u f: x -- x^u ) ?=>? (` | `)`; | ?

`"FORTH"`;
?

`F2/ (f: x -- x/2 ) ?=>? (` | `)`; | ?

`"FORTH"`;
?

`F2* (f: x -- x*2 ) ?=>? (` | `)`; | ?

`"FORTH"`;
?

`F0> (f: x -- s: flag ) ?=>? (` | `)`; | ?

`"FORTH"`;
?

`F0<> (f: x -- s: flag ) ?=>? (` | `)`; | ?

`"FORTH"`;
?

## Description

FLIT - no description, sorry

FP@ ( -- addr ) => "FORTH"

returns the floating point stack pointer

FP! ( addr -- ) => "FORTH"

sets the floating point stack pointer - this is the inverse of `FP@`

F= - no description, sorry

F<> ( f: a b -- s: a!=b ) => "FORTH"

F> - no description, sorry

F<= - no description, sorry

F>= - no description, sorry

S>F ( n -- f: x ) => "FORTH"

it's inverse is `F>S` - convert a cell parameter to floating-point.

FTRUNC>S (f: x -- s: n ) => "FORTH"

The word `F>S` was sometimes defined with a different behavior than `FTRUNC>S` which is the type-cast behaviour of C according to C99 section 6.3.1.4 - truncation would also match the ANS-Forth specification for `F>D`.

Some systems used `F>S` defined to `FROUND>S` instead. The pfe provides explicit words for both conversions, the word `FROUND>S` and `FTRUNC>S` which return single-cell parameters for a floating point number with the conversion method of `FTRUNC` or `FROUND`.

In PFE, `F>S` is a synonym pointing to `FTRUNC>S` in analogy of the behavior of `F>D` where no explicit word exists. The inverse of `F>S` is the cast conversion of `S>F`.

FROUND>S (f: x -- s: n) => "FORTH"

complements `FTRUNC>S` for applications that expect `F>S` to be defined with a rounding behavior like

      : FROUND&gt;S FROUND FTRUNC&gt;S ;

FTRUNC (f: x -- x' ) => "FORTH"

truncate towards zero, discard a fractional part. See also `FTRUNC>S` conversion and the `FROUND` and `FLOOR` adaptors.

      : FTRUNC FDUP F0&lt; IF FCEIL ELSE FLOOR THEN ;

(When available, uses a single call to C99 trunc() internally)

-FROT (f: x1 x2 x3 -- x3 x1 x2 ) => "FORTH"

F-stack equivalent of `-ROT`

note, some systems call this work F-ROT, here it is the inverse of `FROT`

FNIP (f: x1 x2 -- x2 ) => "FORTH"

F-stack equivalent of `NIP`

FTUCK (f: x1 x2 -- x2 x1 x2 ) => "FORTH"

F-stack equivalent of `TUCK`

1/F (f: x -- 1/x ) => "FORTH"

F^2 (f: x -- x^2 ) => "FORTH"

F^N ( u f: x -- x^u ) => "FORTH"

For large exponents, use F** instead. Of course u=-1 is large.

F2/ (f: x -- x/2 ) => "FORTH"

F2* (f: x -- x*2 ) => "FORTH"

F0> (f: x -- s: flag ) => "FORTH"

F0<> (f: x -- s: flag ) => "FORTH"

Prev? | Up | ?Next
pfe-floating-ext? | Home | ?pfe-forth-83-ext