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

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

Aubrey Jaffer scripsit:

>  | > 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.
> All real numbers are complex numbers.  This derives from their
> mathematical definitions.

*General* complex number is a term defined in R5RS: it means non-real
complex number, where "general" is used in the sense of "general case."
Because it seems to confuse people, I have removed it from the draft R7RS.

> Shouldn't the predicates REAL? and COMPLEX? implement the mathematical
> semantics for which they are named?

Inexact numbers don't obey mathematical semantics in any case: for
example, inexact addition is not associative.  There are two reasonable
sets of semantics here, and by providing two sets of procedures we
can support both.  By adding an "exact-complex" feature, a program
that depends on exact complex numbers can rely on being run only on an
implementation that supports them.

Almost all theorems are true,                   John Cowan <cowan@x>
but almost all proofs have bugs.                http://www.ccil.org/~cowan
        --Paul Pedersen

Scheme-reports mailing list