std.complex
Andrei Alexandrescu
SeeWebsiteForEmail at erdani.org
Sun Nov 24 15:29:32 PST 2013
On 11/24/13 10:56 AM, Shammah Chancellor wrote:
> 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
Sure. We ain't above defining an imaginary type!
Andrei
More information about the Digitalmars-d
mailing list