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

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



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@x
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@x
http://lists.scheme-reports.org/cgi-bin/mailman/listinfo/scheme-reports