Am Fr., 13. Sept. 2024 um 14:49 Uhr schrieb Will Clinger < [email protected]>:
> !r6rs > > (import (rnrs base) > (rnrs arithmetic bitwise) > (rnrs control) > (rnrs io simple)) > > ;;; This is a test of Marc Nieper-Wißkirchen's claims 1 and 2. > ;;; > ;;; It has been tested in MzScheme, Vicare, Larceny, and Sagittarius. > ;;; (To run with Sagittarius v0.8.4, one assertion must be disabled.) > > ;;; Marc's Claim 1 amounts to saying the R6RS requires x|p > ;;; to evaluate to the result of (inexact (approximate #ex p)), > ;;; where the approximate procedure is defined as in > ;;; https://srfi-email.schemers.org/srfi-77/msg/25583008/ This is not what I claimed (in what you call Claim 1). I said outside of Claim 1 that it was preferable if it evaluated to the result of (inexact (approximate #eX P)). Claim 1 just says that X|P must evaluate to the inexact number object that represents (approximate #eX P) best. However, as R6RS does not prescribe a rounding mode (one can see this as a deficiency of the standard), "the inexact number object" is not uniquely defined. The value of (inexact (approximate (#eX P)) is just one choice (IMO, the preferable one). (The above is under the assumption that my implementation of "approximate" does not contain a bug, of course.) [...] ;;; Marc's Claim 2 says that when p > q, x|p should evaluate > ;;; to the same inexact number as x|q. > I claimed that it may evaluate to the same inexact number. This is not necessarily the value that is preferable IMO (see above). [...]
