DIP 52 - Implicit conversions

Joseph Rushton Wakeling joseph.wakeling at webdrake.net
Thu Dec 12 06:40:43 PST 2013


On 12/12/13 15:31, Don wrote:
> I don't think Imaginary should exist at all. Mathematically, it's nonsense.
> It's exactly like defining a NegativeInteger. It has horrible properties, such
> as, it's not closed under multiplication!
>
> I don't think there are many applications for pure imaginary numbers, I tried to
> come up with one but failed. Kahan only provides one example in his paper, and
> it's contrived. It eliminates one subtlety but introduces far more. In practice
> it is always far better to just operate directly on the real and imaginary parts.

Well, there have been discussions and requests for it recently because of the 
errors that can arise when you take 2 numbers, one with a purely imaginary part, 
and multiply -- which arise out of the fact that then you have to contend with a 
0 * something calculation.  AFAICS there are also some benefits of precision 
that one can gain for some calculations.


More information about the Digitalmars-d mailing list