<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Issue 201: Numeric limits terminology wrong</title>
<meta property="og:title" content="Issue 201: Numeric limits terminology wrong">
<meta property="og:description" content="C++ library issue. Status: CD1">
<meta property="og:url" content="https://cplusplus.github.io/LWG/issue201.html">
<meta property="og:type" content="website">
<meta property="og:image" content="http://cplusplus.github.io/LWG/images/cpp_logo.png">
<meta property="og:image:alt" content="C++ logo">
<style>
  p {text-align:justify}
  li {text-align:justify}
  pre code.backtick::before { content: "`" }
  pre code.backtick::after { content: "`" }
  blockquote.note
  {
    background-color:#E0E0E0;
    padding-left: 15px;
    padding-right: 15px;
    padding-top: 1px;
    padding-bottom: 1px;
  }
  ins {background-color:#A0FFA0}
  del {background-color:#FFA0A0}
  table.issues-index { border: 1px solid; border-collapse: collapse; }
  table.issues-index th { text-align: center; padding: 4px; border: 1px solid; }
  table.issues-index td { padding: 4px; border: 1px solid; }
  table.issues-index td:nth-child(1) { text-align: right; }
  table.issues-index td:nth-child(2) { text-align: left; }
  table.issues-index td:nth-child(3) { text-align: left; }
  table.issues-index td:nth-child(4) { text-align: left; }
  table.issues-index td:nth-child(5) { text-align: center; }
  table.issues-index td:nth-child(6) { text-align: center; }
  table.issues-index td:nth-child(7) { text-align: left; }
  table.issues-index td:nth-child(5) span.no-pr { color: red; }
  @media (prefers-color-scheme: dark) {
     html {
        color: #ddd;
        background-color: black;
     }
     ins {
        background-color: #225522
     }
     del {
        background-color: #662222
     }
     a {
        color: #6af
     }
     a:visited {
        color: #6af
     }
     blockquote.note
     {
        background-color: rgba(255, 255, 255, .10)
     }
  }
</style>
</head>
<body>
<hr>
<p><em>This page is a snapshot from the LWG issues list, see the <a href="lwg-active.html">Library Active Issues List</a> for more information and the meaning of <a href="lwg-active.html#CD1">CD1</a> status.</em></p>
<h3 id="201"><a href="lwg-defects.html#201">201</a>. Numeric limits terminology wrong</h3>
<p><b>Section:</b> 17.3 <a href="https://wg21.link/support.limits">[support.limits]</a> <b>Status:</b> <a href="lwg-active.html#CD1">CD1</a>
 <b>Submitter:</b> Stephen Cleary <b>Opened:</b> 1999-12-21 <b>Last modified:</b> 2017-06-15</p>
<p><b>Priority: </b>Not Prioritized
</p>
<p><b>View all issues with</b> <a href="lwg-status.html#CD1">CD1</a> status.</p>
<p><b>Discussion:</b></p>
<p>
In some places in this section, the terms "fundamental types" and
"scalar types" are used when the term "arithmetic types" is intended.
The current usage is incorrect because void is a fundamental type and
pointers are scalar types, neither of which should have
specializations of numeric_limits.
</p>
<p><i>[Lillehammer: it remains true that numeric_limits is using
  imprecise language. However, none of the proposals for changed
  wording are clearer.  A redesign of numeric_limits is needed, but this
  is more a task than an open issue.]</i></p>



<p id="res-201"><b>Proposed resolution:</b></p>

<p>
Change 17.3 <a href="https://wg21.link/support.limits">[support.limits]</a> to:
</p>

<blockquote>
<p>
-1- The headers <code>&lt;limits&gt;</code>, <code>&lt;climits&gt;</code>,
<code>&lt;cfloat&gt;</code>, and <code>&lt;cinttypes&gt;</code> supply
characteristics of implementation-dependent <del>fundamental</del>
<ins>arithmetic</ins> types (3.9.1).
</p>
</blockquote>

<p>
Change  [limits] to:
</p>

<blockquote>
<p>
-1- The <code>numeric_limits</code> component provides a C++ program with
information about various properties of the implementation's
representation of the <del>fundamental</del> <ins>arithmetic</ins>
types.
</p>
<p>
-2- Specializations shall be provided for each <del>fundamental</del>
<ins>arithmetic</ins> type, both floating point and integer, including
<code>bool</code>. The member <code>is_specialized</code> shall be <code>true</code>
for all such specializations of <code>numeric_limits</code>.
</p>
<p>
-4- Non-<del>fundamental</del><ins>arithmetic</ins> standard types, such
as <code>complex&lt;T&gt;</code> (26.3.2), shall not have specializations.
</p>
</blockquote>

<p>
Change 17.3.5 <a href="https://wg21.link/numeric.limits">[numeric.limits]</a> to:
</p>

<blockquote>
<p>
<del>-1- The member <code>is_specialized</code> makes it possible to distinguish
between fundamental types, which have specializations, and non-scalar types,
which do not.</del>
</p>
</blockquote>






</body>
</html>
