This site is a static rendering of the Trac instance that was used by R7RS-WG1 for its work on R7RS-small (PDF), which was ratified in 2013. For more information, see Home.
Source for wiki MitSchemeFloatingPoint version 1
author
aag
comment
Added documentation of MIT Scheme's floating-point support, including support for !NaNs and positive and negative infinities, since it's not yet documented in the MIT Scheme manual.
ipnr
173.228.90.157
name
MitSchemeFloatingPoint
readonly
0
text
MIT Scheme now has support for positive and negative infinities and for signaling (the default) and non-signaling !NaNs.
The printed representations are `#[+inf]`, `#[-inf]`, and `#[NaN]`, and are not `read`able.
To disable signaling: `(flo:ignoring-exception-traps `''thunk''`)`. For example:
{{{
(flo:ignoring-exception-traps
(lambda ()
(let* ((i (* 1.0e200 1.0e200)) (n (- i i))) (list i (- i) n))))
;Value 13: (#[+inf] #[-inf] #[NaN])
}}}
These procedures are available for manipulating the floating-point environment:
{{{
flo:nan?
flo:raise-exceptions!
flo:restore-exception-flags!
flo:rounding-mode
flo:rounding-modes
flo:save-exception-flags
flo:set-environment!
flo:set-rounding-mode!
flo:set-trapped-exceptions!
flo:significand-digits-base-2
flo:significand-digits-base-10
flo:supported-exceptions
flo:test-exception-flags
flo:test-exceptions
flo:trap-exceptions!
flo:trappable-exceptions
flo:trapped-exceptions
flo:untrap-exceptions!
flo:update-environment!
flo:with-default-environment
flo:with-exceptions-trapped
flo:with-exceptions-untrapped
flo:with-rounding-mode
flo:with-trapped-exceptions
}}}
time
2012-03-29 12:25:40
version
1