Skip to content

Commit

Permalink
Add documentation for F>S and S>F.
Browse files Browse the repository at this point in the history
  • Loading branch information
SirWumpus committed Sep 30, 2024
1 parent b92c559 commit 7a98874
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions doc/float.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,11 @@ Display, with a trailing space, the top number on the float stack using fixed-po
(F: `f1` `f2` -- ) ( -- `bool`)
`bool` is true if and only if `f1` is less than `f2`.

- - -
#### F>S
(F: `f` -- )( -- `n`)
Convert the float `f` to a single-cell signed integer `n`, the fractional portion of `f` is discarded.

- - -
#### F@
( `faddr` -- ) (F: -- `f` )
Expand Down Expand Up @@ -239,6 +244,11 @@ Return the number of significant digits currently used by `F.`, `FE.`, or `FS.`
(F: `f` -- )( `caddr` `u` -- `n` `isneg` `isok` )
Taking the float `f` return the first `u` digits of the significand, where the is an *implied* decimal point to the left of the first digit, the base-10 exponent `n`, `TRUE` if the value is negative, and `TRUE` if the number is valid (not ± infinity nor NaN). If `f` does not represent a number, where `isok` is `FALSE`, then the values of `n` and `isneg` are undefined.

- - -
#### S>F
(F: -- `f` )( `n` -- )
Convert the single-cell signed integer to a float `f`.

- - -
#### SET-PRECISION
( u -- )
Expand Down

0 comments on commit 7a98874

Please sign in to comment.