[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Scheme-reports] Mixed exactness in complex numbers?
- To: Scheme Reports <scheme-reports@x>
- Subject: [Scheme-reports] Mixed exactness in complex numbers?
- From: Peter Bex <Peter.Bex@x>
- Date: Fri, 23 Mar 2012 20:13:36 +0100
- Mail-followup-to: Scheme Reports <scheme-reports@x>
Hi all,
The report occasionally mentions "an inexact complex number" or
"an exact complex number". Does this imply that there's no such
thing as a complex number of mixed exactness?
Gambit, for example, allows this: 1/2+0.5i
Other Schemes I've looked at (not that many, though) return a
normalised complex number with both real and imaginary parts
converted to inexact.
As far as I can see, this only has impact on the behavior of
eqv?, which needs to check that the exactness of both parts
match and then compare both parts with the regular "=" procedure.
I'm not sure about the usefulness of this (but I'm not convinced
it's useless, either)
Am I missing anything?
Cheers,
Peter
--
http://sjamaan.ath.cx
--
"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
Scheme-reports@x
http://lists.scheme-reports.org/cgi-bin/mailman/listinfo/scheme-reports