std.complex

Andrei Alexandrescu SeeWebsiteForEmail at erdani.org
Sun Nov 24 10:00:45 PST 2013


On 11/24/13 9:54 AM, Joseph Rushton Wakeling wrote:
> On 23/11/13 08:43, Ali Çehreli wrote:
>> import std.stdio;
>> import std.complex;
>>
>> void main()
>> {
>>      writeln(complex(1.0L, -real.infinity) * complex(0.0, 1.0L));
>>      writeln((1L - ireal.infinity) * 1i);
>> }
>>
>>
>> The output:
>>
>> inf-nani    <-- "incorrect" according to the quoted page
>> inf+1i      <-- correct
>
> It's because 0.0L * (-real.infinity) evaluates to nan.

Has this been submitted as a bug report?

Andrei


More information about the Digitalmars-d mailing list