Subject: Re: Real numbers From: Tony Graham <tgraham@xxxxxxxxxxxxxxxx> Date: Wed, 13 Aug 1997 15:54:59 -0400 (EDT) |
At 13 Aug 1997 20:20 +0100, Dave Love wrote: > >>>>> "Tony" == Tony Graham <tgraham@xxxxxxxxxxxxxxxx> writes: > > Tony> Where is the definition of real numbers? What should the > Tony> result be of (number? (sqrt -1)) if DSSSL does not support > Tony> complex numbers? > > Probably a domain error would be most appropriate (typically most > useful), but `(sqrt -1)' might return NaN which should answer #t to > `number?' even though it's `not a number' in the IEEE 754 sense. You > can find both behaviours in Scheme systems. I read further and found (section 8.5.7.20) that sqrt should signal an error if its argument is negative. I still don't know DSSSL's (or Scheme's) definition of a real number ("The Scheme Programming Language" by Dybvig just assumes you understand about real and complex numbers), and I can't think of an argument that would return different values for real? and number? since the only numbers in DSSSL systems are real numbers. Regards, Tony Graham ======================================================================= Tony Graham Mulberry Technologies, Inc. Phone: 301-315-9632 17 West Jefferson Street, Suite 207 Fax: 301-315-8285 Rockville, MD USA 20850 email: tgraham@xxxxxxxxxxxxxxxx ======================================================================= DSSSList info and archive: http://www.mulberrytech.com/dsssl/dssslist
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: Real numbers, Dave Love | Thread | Re: Real numbers, Dave Love |
Re: Real numbers, Dave Love | Date | inclusion procedure, Graydon Hoare |
Month |