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

Re: [Scheme-reports] Mixed exactness in complex numbers?

On Fri, Mar 23, 2012 at 03:48:20PM -0400, Andrew Robbins wrote:
> Peter,
> I hope this isn't considered too off-topic, but Mathematica has 4
> distinct infinities.
> The usual Infinity (+inf.0 in Scheme), -Infinity (-inf.0 in Scheme),
> and the following:
> - ComplexInfinity (might be represented in Scheme as (make-polar
> +inf.0 +nan.0)), and

What about the negative version of this one?

> - DirectedInfinity[z] (might be represented in Scheme as (make-polar
> +inf.0 (angle z))).

Same question here.  And what about (make-polar +nan.0 +nan.0)?

If I'm asking stupid questions, pardon my ignorance.  I don't really
know anything about complex numbers.

> If y is an exact number, then (imag-part (log ...)) should also be exact.
> I'm not sure how many Scheme implementations actually store exact polar
> complex numbers this way, but it helps keep numbers exact.

I wonder about that too.  Even Gambit doesn't represent exact polar complex
numbers exactly.  Perhaps John could provide a list of Schemes that do.

"The process of preparing programs for a digital computer
 is especially attractive, not only because it can be economically
 and scientifically rewarding, but also because it can be an aesthetic
 experience much like composing poetry or music."
							-- Donald Knuth

Scheme-reports mailing list