Created on 2008-01-26.00:00:00 last changed 171 months ago
Proposed resolution:
In [complex.syn] add just between the declaration of conj and fabs:
template<class T> complex<T> conj(const complex<T>&); template<class T> complex<T> proj(const complex<T>&); template<class T> complex<T> fabs(const complex<T>&);
In [complex.value.ops] just after p.6 (return clause of conj) add:
template<class T> complex<T> proj(const complex<T>& x);Effects: Behaves the same as C99 function cproj, defined in subclause 7.3.9.4."
In [cmplx.over] p. 1, add one further entry proj to the overload list.
The following function templates shall have additional overloads:
arg norm conjpolarproj imag real
A comparision of the N2461 header <complex> synopsis ([complex.syn]) with the C99 standard (ISO 9899, 2nd edition and the two corrigenda) show some complex functions that are missing in C++. These are:
cerf cerfc cexp2 cexpm1 clog10 clog1p clog2 clgamma ctgamma
I propose that at least the required cproj overloads are provided as equivalent C++ functions. This addition is easy to do in one sentence (delegation to C99 function).
Please note also that the current entry polar in [cmplx.over] p. 1 should be removed from the mentioned overload list. It does not make sense to require that a function already expecting scalar arguments should cast these arguments into corresponding complex<T> arguments, which are not accepted by this function.
History | |||
---|---|---|---|
Date | User | Action | Args |
2010-10-21 18:28:33 | admin | set | messages: + msg3755 |
2008-01-26 00:00:00 | admin | create |