[Scheme-reports] Mixed exactness in complex numbers? Peter Bex (23 Mar 2012 19:13 UTC)
Re: [Scheme-reports] Mixed exactness in complex numbers? Andrew Robbins (23 Mar 2012 19:48 UTC)
Re: [Scheme-reports] Mixed exactness in complex numbers? John Cowan (23 Mar 2012 20:32 UTC)

Re: [Scheme-reports] Mixed exactness in complex numbers? John Cowan 23 Mar 2012 20:32 UTC

Andrew Robbins scripsit:

> Consider the logarithm of a directed infinity. (log (make-polar +inf.0
> y)) should be +inf.0+yi, whatever y is. 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.

None of the ones on my list do.  They all work like this:

(make-polar +inf.0 +nan.0) => +nan.0+nan.0i
(make-polar +inf.0 2) => -inf.0+inf.0i
(log (make-polar +inf.0 2) => +nan.0+2.356194490192345i

--
He made the Legislature meet at one-horse       John Cowan
tank-towns out in the alfalfa belt, so that     cowan@ccil.org
hardly nobody could get there and most of       http://www.ccil.org/~cowan
the leaders would stay home and let him go      --H.L. Mencken's
to work and do things as he pleased.              Declaration of Independence

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