Mercurial > hg > octave-terminal
changeset 8899:4ab9654eceac
update comment
author | Jaroslav Hajek <highegg@gmail.com> |
---|---|
date | Mon, 02 Mar 2009 12:12:29 +0100 |
parents | ca032de5fbf2 |
children | 63ad1133d0ed |
files | liboctave/mx-inlines.cc |
diffstat | 1 files changed, 3 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/liboctave/mx-inlines.cc +++ b/liboctave/mx-inlines.cc @@ -286,7 +286,9 @@ OP_DUP_FCN (imag, mx_inline_imag_dup, float, FloatComplex) OP_DUP_FCN (conj, mx_inline_conj_dup, FloatComplex, FloatComplex) -// NOTE: std::norm is NOT equivalent +// FIXME: Due to a performance defect in g++ (<= 4.3), std::norm is slow unless +// ffast-math is on (not by default even with -O3). The following helper function +// gives the expected straightforward implementation of std::norm. template <class T> inline T cabsq (const std::complex<T>& c) { return c.real () * c.real () + c.imag () * c.imag (); }