octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Complex mappers for real values


From: Rik
Subject: Re: Complex mappers for real values
Date: Fri, 23 Jun 2017 19:46:44 -0700

On 06/22/2017 11:48 AM, Mike Miller wrote:
> On Thu, Jun 22, 2017 at 13:14:58 -0500, Dmitri A. Sergatskov wrote:
>> I meant the code from
>>
>> http://en.cppreference.com/w/cpp/numeric/complex/conj
> […]
>> returns the same with all compilers I tried:
>>
>> The conjugate of (1,2) is (1,-2)
>> Their product is (5,0)
> Ok, no surprise there.
>
>> But Carnë Draug's code has a discrepancies.
> Right. And thanks for that pointer (and thanks Carnë for pointing to the
> WG discussion), that helps clarify that this may be considered a bug in
> the C++11 standard and may have changed or may change in subsequent
> revisions of the standard.
>
> For now, to support gcc 4.8-7 and clang, we must continue to provide our
> own conj wrapper.
>
> Rik - I feel like the comment could be worded better to clarify that
> this is a defect in the C++11 standard wording and compilers have chosen
> to impement this differently and all may change in the future… but for
> now we must keep at least the conj wrapper.

I will keep the conj wrapper.

I prefer less code to more code because there is a maintenance burden for
every single line.  I'll remove the other complex wrapper functions.

--Rik





reply via email to

[Prev in Thread] Current Thread [Next in Thread]