[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

*To*: srfi-77@xxxxxxxxxxxxxxxxx*Subject*: Re: Testing the reference implementation*From*: Michael Sperber <sperber@xxxxxxxxxxxxxxxxxxxxxxxxxxx>*Date*: Tue, 25 Oct 2005 19:47:17 -1000*Delivered-to*: srfi-77@xxxxxxxxxxxxxxxxx*In-reply-to*: <65F0ACB8-5A26-46A1-96F5-B98A22C783E2@xxxxxxxxxxxxxxx> (Bradley Lucier's message of "Sat, 22 Oct 2005 22:59:07 -0500")*References*: <65F0ACB8-5A26-46A1-96F5-B98A22C783E2@xxxxxxxxxxxxxxx>*User-agent*: Gnus/5.110003 (No Gnus v0.3) XEmacs/21.5-b21 (darwin)

Bradley Lucier <lucier@xxxxxxxxxxxxxxx> writes: > I've looked in the Scheme 48 docs and the web page for SRFI-34 and > tried to get the following program to work. Unfortunately, in the > "will" implementation it gives me only the following: > > r6rs/will> (load "complex-test.scm") > complex-test.scm > > Error: I'm bored. > #{Inf} > (&error) That's a bug with the conversion between exact and inexact numbers that I found and fixed (along with numerous other errors in the implementation of R5RS arithmetic in Scheme 48 and Larceny) while writing the reference implementation. You can work around it by replacing the definition of /* in flonum.scm by: (define (/* a b) (cond ((not (= b 0.0)) (/ a b)) ((= a 0.0) r5rs-nan) ((positive? a) r5rs-inf+) (else r5rs-inf-))) [Understanding why (= a 0.0) may be intensionally different from (zero? a) in the naive implementation of ZERO? yields interesting insights into the workings of R5RS generic arithmetic, BTW.] (Of course, this will be in the next revision in the SRFI, and the next version of Scheme 48 will also have fixed the problem.) -- Cheers =8-} Mike Friede, Völkerverständigung und überhaupt blabla

**Follow-Ups**:**Re: Testing the reference implementation***From:*Bradley Lucier

**References**:**Testing the reference implementation***From:*Bradley Lucier

- Prev by Date:
**Re: Error objects in general** - Next by Date:
**Re: Testing the reference implementation** - Previous by thread:
**Testing the reference implementation** - Next by thread:
**Re: Testing the reference implementation** - Index(es):