docs: note in flsingle about its use for single-precision operations

Add some reassurance that `flsingle` can be used to implement
single-precision arithmetic.
This commit is contained in:
Matthew Flatt 2021-03-20 12:27:50 -06:00
parent 8bf8e3cf82
commit bcd16840da
2 changed files with 15 additions and 0 deletions

View File

@ -69,6 +69,15 @@ and range so that the result can be represented as a single-precision
IEEE floating-point number (even if @tech{single-flonums} are not
supported).
Using @racket[flsingle] on the arguments and results of @racket[fl+],
@racket[fl-], @racket[fl*], @racket[fl/], and @racket[flsqrt]---that
is, performing double-precision operations on values representable in
single precision and then rounding the result to single precision---is
always the same as performing the corresponding single-precision
operation @cite{Roux14}. (For other operations, the IEEE
floating-point specification does not make enough guarantees to say
more about the interaction with @racket[flsingle].)
@history[#:added "7.8.0.7"]}

View File

@ -209,6 +209,12 @@ The @racketmodname[racket] library combines
#:url "https://doi.org/10.1017/CBO9780511574962"
#:date "1999")
(bib-entry #:key "Roux14"
#:author "Pierre Roux"
#:title "Innocuous Double Rounding of Basic Arithmetic Operations"
#:location @elem{@italic{Journal of Formalized Reasoning}, 7(1)}
#:date "2014")
(bib-entry #:key "Sapin18"
#:author "Simon Sapin"
#:title "The WTF-8 Encoding"