Submitter:CFP group
Submission Date: 2021-01-24
Document: WG14 N2643
Title: N2643: negative
Reference Documents: N2596
Summary: The term 'negative' is ambiguous when talking about zero.
Is -0.0 negative? Is it nonnegative? Is +0.0 positive? We believe that:
However, -0.0 and +0.0 are both nonnegative and nonpositive.
Since C23 now requires just twos complement integers, there are no -0 integers (unlike with sign-magnitude and ones complement).
Since some people interpret 'negative' to include -0.0, we believe that the following changes would make the standard clearer.
A domain error occurs if the argument is negative.to
A domain error occurs if the argument isnegativeless than zero.
A domain error occurs if the argument is negative.to
A domain error occurs if the argument isnegativeless than zero.
A domain error occurs if x is finite and negative and y is finite and not an integer value.to
A domain error occurs if x is finite andnegativeless than zero and y is finite and not an integer value.
A range error occurs for some negative finite xto
A range error occurs for somenegativefinite x less than zero
(It begins with a sign only when a negative value is converted if this flag is not specified.)300)to
(It begins with a sign only when anegativevalue with a negative sign is converted if this flag is not specified.)300)
Since footnote 300
300) The results of all floating conversions of a negative zero, and of negative values that round to zero, include a minus sign.
is not normative, we believe that the above change is needed.
(It begins with a sign only when a negative value is converted if this flag is not specified.)356)to
(It begins with a sign only when anegativevalue with a negative sign is converted if this flag is not specified.)356)
Since footnote 356
356) The results of all floating conversions of a negative zero, and of negative values that round to zero, include a minus sign.
is not normative, we believe that the above change is needed.