<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta name="generator" content=
"HTML Tidy for OS/2 (vers 1 September 2005), see www.w3.org">
<style type="text/css">
del { font-weight:bold;background-color:#ffa0a0 }
ins { font-weight:bold;background-color:#a0ffa0 }
blockquote {
display: block;
font-family: "Times New Roman";
background-color:lightgray;
margin-top: 1em;
margin-bottom: 1em;
margin-left: 40px;
margin-right: 40px
}
</style>
<title>26yy: negative</title>
</head>
<body>
<p><br>
<!-- Who are the authors... -->
<b>Submitter:</b>CFP group<br>
<!-- What is the date of submission. yyyy-mm-dd -->
<b>Submission Date:</b> 2021-??-??<br>
<b>Document:</b> WG14 26yy<br>
<b>Title:</b> 26yy: negative<br>
<b>Reference Documents:</b> N2596</p>
<p>Summary: The term 'negative' is ambiguous when talking about
zero.</p>
<p>Is -0.0 negative? Is it nonnegative? Is +0.0 positive? We
believe that:</p>
<ul>
<li>negative is less than zero</li>
<li>positive is greater than zero</li>
<li>-0.0 and +0.0 are neither negative nor positive values</li>
<li>-0.0 has a negative sign</li>
<li>+0.0 has a positive sign</li>
</ul>
<p>However, -0.0 and +0.0 are both nonnegative and
nonpositive.</p>
<p>Since C23 now requires just twos complement integers, there
are no -0 integers (unlike with sign-magnitude and ones
complement).</p>
<p>Since some people interpret 'negative' to include -0.0, we
believe that the following changes would make the standard
clearer.</p>
<ul>
<li>In 7.12.6.11 The log functions, change
<blockquote>
A domain error occurs if the argument is negative.
</blockquote>to
<blockquote>
A domain error occurs if the argument is
<del>negative</del><ins>less than zero</ins>.
</blockquote>
</li>
<li>In 7.12.6.12 The log10 functions, change
<blockquote>
A domain error occurs if the argument is negative.
</blockquote>to
<blockquote>
A domain error occurs if the argument is
<del>negative</del><ins>less than zero</ins>.
</blockquote>
</li>
<li>In 7.12.7.5 The pow functions, change
<blockquote>
A domain error occurs if x is finite and negative and y is
finite and not an integer value.
</blockquote>to
<blockquote>
A domain error occurs if x is finite and
<del>negative</del><ins>less than zero</ins> and y is
finite and not an integer value.
</blockquote>
</li>
<li>In 7.12.8.4 The tgamma functions, change
<blockquote>
A range error occurs for some negative finite x
</blockquote>to
<blockquote>
A range error occurs for some <del>negative</del> finite x
<ins>less than zero</ins>
</blockquote>
</li>
<li>In 7.21.6.1 The fprintf function, '+' flag, change:
<blockquote>
(It begins with a sign only when a negative value is
converted if this flag is not specified.)300)
</blockquote>to
<blockquote>
(It begins with a sign only when a negative
<ins>signed</ins> value is converted if this flag is not
specified.)300)
</blockquote>
<p>Since footnote 300</p>
<blockquote>
300) The results of all floating conversions of a negative
zero, and of negative values that round to zero, include a
minus sign.
</blockquote>
<p>is not normative, we believe that the above change is
needed.</p>
</li>
<li>In 7.29.2.1 The fwprintf function, '+' flag, change:
<blockquote>
(It begins with a sign only when a negative value is
converted if this flag is not specified.)356)
</blockquote>to
<blockquote>
(It begins with a sign only when a negative
<ins>signed</ins> value is converted if this flag is not
specified.)356)
</blockquote>
<p>Since footnote 356</p>
<blockquote>
356) The results of all floating conversions of a negative
zero, and of negative values that round to zero, include a
minus sign.
</blockquote>
<p>is not normative, we believe that the above change is
needed.</p>
</li>
</ul>
</body>
</html>