std.complex

John Colvin john.loughran.colvin at gmail.com
Tue Nov 26 05:32:19 PST 2013


On Tuesday, 26 November 2013 at 13:20:39 UTC, Joseph Rushton 
Wakeling wrote:
> On 26/11/13 13:52, John Colvin wrote:
>> It seems to me that one really shouldn't special case for 
>> absolute values when
>> dealing with floating point. A floating Imaginary type and an 
>> integer Complex
>> type - both in std.complex - are the correct solutions IMO.
>
> Yup, agree.

Just had a chat with one of our local numerics experts: He agreed 
that hidden special casing that breaks standards compliance is 
bad and that whatever the solution was it should be explicit.

However, the following situation arises:

Complex!double(1, -double.inf) * Complex!int(0, i);

What does IEEE say about that? 0 * inf == nan?


More information about the Digitalmars-d mailing list