Alex Shinn <alexshinn@x> writes:In that case, the bug is in 'make-rectangular'.
> The result you're seeing is because make-rectangular
> is defined:
> (define (make-rectangular x y)
> (+ x (* y (sqrt -1))))
> in order to keep the number of primitives to a minimum,
> and the sign on the zero gets lost in the arithmetic.
The R7RS-draft-8 states in the definition of 'make-rectangular':
> The standard is silent on whether or not this is allowed
> for make-rectangular,
Then all of:
(make-rectangular x_1 x_2) => z
(real-part z) => x_1
(imag-part z) => x_2
are true, [...]
> but note in Chibi the value -0.0 isOkay. IMO, it's unwise to allow inexacts to use unbounded amounts of
> only supported as a place holder and in the future will
> be removed in favor of not underflowing.
memory and computation time, and I could easily construct example
computations that work well on most implementations but that slow down
to a crawl and/or run out of memory in your proposed representation, but
Chibi is your baby and that's your choice.
_______________________________________________ Scheme-reports mailing list Scheme-reports@x http://lists.scheme-reports.org/cgi-bin/mailman/listinfo/scheme-reports