forked from lwg/issues
-
Notifications
You must be signed in to change notification settings - Fork 28
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
New issue from Thomas: "Clarify whether arithmetic expressions in [nu…
…meric.sat.func] are mathematical or C+"
- Loading branch information
Showing
1 changed file
with
51 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
<?xml version='1.0' encoding='utf-8' standalone='no'?> | ||
<!DOCTYPE issue SYSTEM "lwg-issue.dtd"> | ||
|
||
<issue num="4030" status="New"> | ||
<title>Clarify whether arithmetic expressions in [numeric.sat.func] are mathematical or C++</title> | ||
<section><sref ref="[numeric.sat.func]"/></section> | ||
<submitter>Thomas Köppe</submitter> | ||
<date>18 Dec 2023</date> | ||
<priority>99</priority> | ||
|
||
<discussion> | ||
<p> | ||
During the application of <paper num="P0543R0"/>, "Saturation arithmetic", it was pointed out that it | ||
might not be entirely clear what we want something like "<tt>x</tt> + <tt>y</tt>" to mean. The paper does not | ||
suggest any formatting for those symbols, and a non-normative note explains that the intention is for | ||
the expression to be considered mathematically. | ||
<p/> | ||
I wonder if this is clear enough. Notes are not normative, and the document "shall be usable without notes". | ||
I have formatted this as <tt>$\tcode{x} + \tcode{y}$</tt> throughout, i.e. the variables are in code font, | ||
but the symbol is maths, not code. This is quite subtle. (See also | ||
<a href="https://github.com/cplusplus/draft/pull/6686">GitHub discussion</a>.) | ||
<p/> | ||
I think it would be an improvement if we simply made the note not be a note. It seems to contain entirely reasonable, mandatory content. | ||
</p> | ||
</discussion> | ||
|
||
<resolution> | ||
<p> | ||
This wording is relative to <paper num="N4971"/>. | ||
</p> | ||
|
||
<ol> | ||
|
||
<li><p>Modify <sref ref="[numeric.sat.func]"/> as indicated:</p> | ||
|
||
<blockquote> | ||
<p> | ||
-1- <del>[<i>Note 1</i>:</del> In the following descriptions, an arithmetic operation is performed as a mathematical | ||
operation with infinite range and then it is determined whether the mathematical result fits into the result type. | ||
<del>— <i>end note</i>]</del> | ||
</p> | ||
</blockquote> | ||
|
||
</li> | ||
|
||
</ol> | ||
|
||
|
||
</resolution> | ||
|
||
</issue> |