Created on 2008-06-03.00:00:00 last changed 171 months ago
Proposed resolution:
Strike this pow overload in [complex.syn] and in [complex.transcendentals]:
template<class T> complex<T> pow(const complex<T>& x, int y);
[ Sophia Antipolis: ]
Since int promotes to double, and C99 doesn't have an int-based overload for pow, the C99 result is complex<double>, see also C99 7.22, see also library issue 550.
Special note: ask P.J. Plauger.
Looks fine.
The current working draft is in an inconsistent state.
[complex.transcendentals] says that:
pow(complex<float>(), int()) returns a complex<float>.
[cmplx.over] says that:
pow(complex<float>(), int()) returns a complex<double>.
History | |||
---|---|---|---|
Date | User | Action | Args |
2010-10-21 18:28:33 | admin | set | messages: + msg4025 |
2010-10-21 18:28:33 | admin | set | messages: + msg4024 |
2008-06-03 00:00:00 | admin | create |