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

Re: [Scheme-reports] Numerical example (real? -2.5+0.0i)



 | Date: Mon, 15 Aug 2011 15:06:18 -0400
 | From: John Cowan <cowan@x>
 | 
 | Aubrey Jaffer scripsit:
 | 
 | > The SCM implementation does not and will not support mixed exactness
 | > numbers:
 | 
 | That's reasonable: in fact, SCM doesn't support exact/exact complex
 | numbers either, which is perfectly fine.  It just means that no
 | general complex number can be real.

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.

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.

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?

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.

I don't see this information in r7rs-draft-3.pdf, leaving a huge hole
in the specification.  One cannot appeal to Real Analysis for
operations on inifinities because, mathematically, infinities are not
real or complex numbers.  Their behavior should be explicitly
specified.

_______________________________________________
Scheme-reports mailing list
Scheme-reports@x
http://lists.scheme-reports.org/cgi-bin/mailman/listinfo/scheme-reports