std.complex
Shammah Chancellor
anonymous at coward.com
Sun Nov 24 10:56:42 PST 2013
On 2013-11-24 18:37:51 +0000, Andrei Alexandrescu said:
> But that originates as a call to multiplication between two Complex
> numbers. Can't the problem be addressed at that level?
>
> Andrei
I don't believe so because IEEE floats define inf*0 to be NaN. You
would have to check to see if rhs.re == 0 || lhs.re == 0 and then just
return zero. Somewhat unfortunate. You really do need an imaginary
type for reasons specified in the original page here:
http://digitalmars.com/d/1.0/cppcomplex.html
-Shammah
More information about the Digitalmars-d
mailing list