4030. Clarify whether arithmetic expressions in [numeric.sat.func] are mathematical or C++

Section: 27.10.17.1 [numeric.sat.func] Status: New Submitter: Thomas Köppe Opened: 2023-12-18 Last modified: 2023-12-22 14:16:41 UTC

Priority: Not Prioritized

View all issues with New status.

Discussion:

During the application of P0543R0, "Saturation arithmetic", it was pointed out that it might not be entirely clear what we want something like "x + y" 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.

I wonder if this is clear enough. Notes are not normative, and the document "shall be usable without notes". I have formatted this as $\tcode{x} + \tcode{y}$ throughout, i.e. the variables are in code font, but the symbol is maths, not code. This is quite subtle. (See also GitHub discussion.)

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.

Proposed resolution:

This wording is relative to N4971.

  1. Modify 27.10.17.1 [numeric.sat.func] as indicated:

    -1- [Note 1: 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. end note]