<T>LAPACK 0.1.2
C++ Template Linear Algebra PACKage
|
Public Member Functions | |
constexpr | NaNPropagComplex (const T &r=T(), const T &i=T()) |
template<typename U > | |
constexpr NaNPropagComplex & | operator*= (const std::complex< U > &x) |
constexpr NaNPropagComplex & | operator*= (const T &x) |
template<typename U > | |
constexpr NaNPropagComplex & | operator+= (const std::complex< U > &x) |
template<typename U > | |
constexpr NaNPropagComplex & | operator-= (const std::complex< U > &x) |
template<typename U > | |
constexpr NaNPropagComplex & | operator/= (const std::complex< U > &x) |
constexpr NaNPropagComplex & | operator/= (const T &x) |
template<typename U > | |
constexpr NaNPropagComplex & | operator= (const std::complex< U > &x) |
|
friend |
2-norm absolute value, sqrt( |Re(x)|^2 + |Im(x)|^2 )
Note that std::abs< std::complex > does not overflow or underflow at intermediate stages of the computation.
However, std::abs(std::complex<T>) may not propagate NaNs. See https://github.com/tlapack/tlapack/issues/134#issue-1364091844. Operations with std::complex<T>
, for T=float,double,long double
are wrappers to operations in C. Other types have their implementation in C++. Because of that, the logic of complex multiplication, division and other operations may change from type to type. See https://github.com/advanpix/mpreal/issues/11.
Also, std::abs< mpfr::mpreal > may not propagate Infs.