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: Mike Miller
Subject: Re: Complex mappers for real values
Date: Thu, 22 Jun 2017 11:48:38 -0700
User-agent: NeoMutt/20170306 (1.8.0)

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.

-- 
mike



reply via email to

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