Re: Contagious Inexactness, revision 2
Marcin 'Qrczak' Kowalczyk 16 Nov 2005 09:12 UTC
Andrew Wilcox <xxxxxx@andrewwilcox.name> writes:
> Two Scheme implementations returning results flagged as exact, from
> the same computation, performed on the same inputs, will return
> equal values.
I believe this is unimplementable sanely.
Assume, for the sake of argument, that
(= (expt (sqrt 2) 2) 2)
is an example of an expression which is #t and #f on different
implementations. Of course with your proposal these are inexact
booleans.
Now consider this:
(define (test)
(let ((l '()))
(if (= (expt (sqrt 2) 2) 2)
(set! l (cons #f l)))
(length l)))
Does this return an inexact 0 or 1? If yes, how would you implement this?
--
__("< Marcin Kowalczyk
\__/ xxxxxx@knm.org.pl
^^ http://qrnik.knm.org.pl/~qrczak/