Re: [Scheme-reports] Numerical example (real? -2.5+0.0i)
John Cowan 16 Aug 2011 18:25 UTC
Aubrey Jaffer scripsit:
> Algebraically, the complex numbers are the field of reals extended by
> a solution of x^2+1=0. All reals are complex; there is no difference
> between real 2.0 and 2.0+0.0i.
I used the term "general complex number" in the same sense it is used
in R5RS, to mean a number whose imaginary part is nonzero.
> FreeSnell <http://people.csail.mit.edu/jaffer/FreeSnell> is a Scheme
> application for computing the optical properties of thin-films. It
> uses complex numbers intensively in its computations. The only
> effects of distinguishing real real from complex real numbers would be
> to increase its storage and reduce its performance.
I don't understand this. How can either storage or performance depend
on the result returned by the real? procedure?
> So no, SCM won't be distinguishing "real reals" from "complex reals".
>
> | The rationale here is that a number with imaginary part 0.0 isn't
> | necessarily on the real line, since 0.0 just means a number x such
> | that 0 < x < the smallest representable inexact number.
>
> Is that the official r7rs model of inexact numbers?
Nothing about rationales is official, and this one isn't even in the
report, so that question is self-answering.
> It isn't SCM's model; <http://srfi.schemers.org/srfi-70/srfi-70.html>
> is. SRFI-70 specifies the result of numerical procedures applied to
> infinities and zeros.
There will eventually be a specification in R7RS-small as well, probably
similar to R5RS and IEEE 754:2008.
> I don't see this information in r7rs-draft-3.pdf, leaving a huge hole
> in the specification.
I agree. It would be helpful to provide suitable text.
--
Verbogeny is one of the pleasurettes John Cowan <cowan@ccil.org>
of a creatific thinkerizer. http://www.ccil.org/~cowan
--Peter da Silva
_______________________________________________
Scheme-reports mailing list
Scheme-reports@scheme-reports.org
http://lists.scheme-reports.org/cgi-bin/mailman/listinfo/scheme-reports