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 10:30:13 -0700
User-agent: NeoMutt/20170306 (1.8.0)

On Thu, Jun 22, 2017 at 10:14:26 -0700, Mike Miller wrote:
> According to cppreference [1], std::conj(double) should return a
> std::complex<double>. Under gcc's libstdc++, the return value is a
> double. Using clang's libc++, the return value is a
> std::complex<double>.

I forgot the link

  [1] http://en.cppreference.com/w/cpp/numeric/complex/conj

Might as well share these for comparison

  [2] http://en.cppreference.com/w/cpp/numeric/complex/arg
  [3] http://en.cppreference.com/w/cpp/numeric/complex/imag
  [4] http://en.cppreference.com/w/cpp/numeric/complex/real

To repeat and clarify, I suspect std::arg, std::imag, and std::real are
ok to use directly, but std::conj differs between compilers, and Octave
wants behavior that differs from the C++ standard anyway.

HTH,

-- 
mike



reply via email to

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