Mercurial > octave
diff liboctave/array/CNDArray.cc @ 22274:edcad35c364f
don't rely on std:: overloads of arg, conj, imag, and real for real args
* lo-mappers.h (arg, conj, imag, real): Provide overloads for real
arguments in octave::math namespace instead of importing them from
std namespace.
* __ichol__.cc, ls-mat4.cc, ls-mat5.cc, __eigs__.cc, ov-complex.cc,
ov-complex.h, ov-cx-mat.cc, ov-cx-sparse.cc, ov-flt-complex.cc,
ov-flt-complex.h, ov-flt-cx-mat.cc, CMatrix.cc, CNDArray.cc,
CSparse.cc, MatrixType.cc, dMatrix.cc, dSparse.cc, fCMatrix.cc,
fCNDArray.cc, fMatrix.cc, chol.cc, eigs-base.cc, lo-mappers.cc,
lo-specfun.cc, sparse-qr.cc: Update for arg, conj, imag, and real
functions in octave::math namespace. Prefer member function versions
of real and imag for simple variables. Use std:: namespace versions
directly for known complex values. Use octave::math namespace
versions otherwise
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Thu, 11 Aug 2016 16:26:56 -0400 |
parents | 77c4d43e06d1 |
children | 93b3cdd36854 |
line wrap: on
line diff
--- a/liboctave/array/CNDArray.cc Fri Aug 12 00:19:11 2016 +0100 +++ b/liboctave/array/CNDArray.cc Thu Aug 11 16:26:56 2016 -0400 @@ -540,8 +540,8 @@ { Complex val = elem (0); - double r_val = std::real (val); - double i_val = std::imag (val); + double r_val = val.real (); + double i_val = val.imag (); max_val = r_val; min_val = r_val; @@ -559,8 +559,8 @@ { Complex val = elem (i); - double r_val = std::real (val); - double i_val = std::imag (val); + double r_val = val.real (); + double i_val = val.imag (); if (r_val > max_val) max_val = r_val;