Title
conj specification is now nonsense
Status
c++11
Section
[cmplx.over]
Submitter
P.J. Plauger

Created on 2010-10-14.00:00:00 last changed 154 months ago

Messages

Date: 2010-11-24.14:01:03

Proposed resolution:

Remove the recently added paragraph 3 from [cmplx.over]:

3 All the specified overloads shall have a return type which is the nested value_type of the effectively cast arguments.

Date: 2010-11-24.14:01:03

[ Adopted at 2010-11 Batavia ]

Date: 2010-11-11.19:16:05

[ 2010 Batavia: The working group concurred with the issue's Proposed Resolution ]

Date: 2010-10-14.00:00:00

In Pittsburgh, we accepted the resolution of library issue 1137, to add a sentence 3 to [cmplx.over]:

All the specified overloads shall have a return type which is the nested value_type of the effectively cast arguments.

This was already true for four of the six functions except conj and proj. It is not completely unreasonable to make proj return the real value only, but the IEC specification does call for an imaginary part of -0 in some circumstances. The people who care about these distinctions really care, and it is required by an international standard.

Making conj return just the real part breaks it horribly, however. It is well understood in mathematics that conj(re + i*im) is (re - i*im), and it is widely used. The accepted new definition makes conj useful only for pure real operations. This botch absolutely must be fixed.

History
Date User Action Args
2011-08-23 20:07:26adminsetstatus: wp -> c++11
2010-11-24 14:01:03adminsetmessages: + msg5440
2010-11-14 13:10:57adminsetstatus: voting -> wp
2010-11-13 01:17:02adminsetstatus: open -> voting
2010-11-13 01:11:40adminsetstatus: immediate -> open
2010-11-11 19:16:05adminsetmessages: + msg5335
2010-11-11 19:16:05adminsetstatus: new -> immediate
2010-10-29 14:46:33adminsetmessages: + msg5189
2010-10-14 00:00:00admincreate