From Jason Turner

[numeric.limits]

Diff to HTML by rtfpessoa

Files changed (1) hide show
  1. tmp/tmpgtdkm_ki/{from.md → to.md} +12 -16
tmp/tmpgtdkm_ki/{from.md → to.md} RENAMED
@@ -44,14 +44,10 @@ namespace std {
44
 
45
  static constexpr bool traps = false;
46
  static constexpr bool tinyness_before = false;
47
  static constexpr float_round_style round_style = round_toward_zero;
48
  };
49
-
50
- template<class T> class numeric_limits<const T>;
51
- template<class T> class numeric_limits<volatile T>;
52
- template<class T> class numeric_limits<const volatile T>;
53
  }
54
  ```
55
 
56
  For all members declared `static` `constexpr` in the `numeric_limits`
57
  template, specializations shall define these values in such a way that
@@ -67,26 +63,26 @@ floating-point and integer, including `bool`. The member
67
 
68
  The value of each member of a specialization of `numeric_limits` on a
69
  cv-qualified type `cv T` shall be equal to the value of the
70
  corresponding member of the specialization on the unqualified type `T`.
71
 
72
- Non-arithmetic standard types, such as `complex<T>` ([[complex]]),
73
- shall not have specializations.
74
 
75
  #### `numeric_limits` members <a id="numeric.limits.members">[[numeric.limits.members]]</a>
76
 
77
- Each member function defined in this subclause is signal-safe (
78
- [[csignal.syn]]).
79
 
80
  ``` cpp
81
  static constexpr T min() noexcept;
82
  ```
83
 
84
  Minimum finite value.[^3]
85
 
86
- For floating types with subnormal numbers, returns the minimum positive
87
- normalized value.
88
 
89
  Meaningful for all specializations in which `is_bounded != false`, or
90
  `is_bounded == false && is_signed == false`.
91
 
92
  ``` cpp
@@ -162,11 +158,11 @@ Meaningful for all specializations.
162
 
163
  ``` cpp
164
  static constexpr int radix;
165
  ```
166
 
167
- For floating types, specifies the base or radix of the exponent
168
  representation (often 2).[^8]
169
 
170
  For integer types, specifies the base of the representation.[^9]
171
 
172
  Meaningful for all specializations.
@@ -323,11 +319,11 @@ Meaningful for all floating-point types.
323
  static constexpr bool is_bounded;
324
  ```
325
 
326
  `true` if the set of values representable by the type is finite.[^25]
327
 
328
- [*Note 1*: All fundamental types ([[basic.fundamental]]) are bounded.
329
  This member would be `false` for arbitrary precision
330
  types. — *end note*]
331
 
332
  Meaningful for all specializations.
333
 
@@ -340,22 +336,22 @@ operation involving `+`, `-`, or `*` on values of that type whose result
340
  would fall outside the range \[`min()`, `max()`\], the value returned
341
  differs from the true value by an integer multiple of
342
  `max() - min() + 1`.
343
 
344
  [*Example 1*: `is_modulo` is `false` for signed integer
345
- types ([[basic.fundamental]]) unless an implementation, as an extension
346
- to this International Standard, defines signed integer overflow to
347
  wrap. — *end example*]
348
 
349
  Meaningful for all specializations.
350
 
351
  ``` cpp
352
  static constexpr bool traps;
353
  ```
354
 
355
- `true` if, at program startup, there exists a value of the type that
356
- would cause an arithmetic operation using that value to trap.[^27]
357
 
358
  Meaningful for all specializations.
359
 
360
  ``` cpp
361
  static constexpr bool tinyness_before;
 
44
 
45
  static constexpr bool traps = false;
46
  static constexpr bool tinyness_before = false;
47
  static constexpr float_round_style round_style = round_toward_zero;
48
  };
 
 
 
 
49
  }
50
  ```
51
 
52
  For all members declared `static` `constexpr` in the `numeric_limits`
53
  template, specializations shall define these values in such a way that
 
63
 
64
  The value of each member of a specialization of `numeric_limits` on a
65
  cv-qualified type `cv T` shall be equal to the value of the
66
  corresponding member of the specialization on the unqualified type `T`.
67
 
68
+ Non-arithmetic standard types, such as `complex<T>` [[complex]], shall
69
+ not have specializations.
70
 
71
  #### `numeric_limits` members <a id="numeric.limits.members">[[numeric.limits.members]]</a>
72
 
73
+ Each member function defined in this subclause is signal-safe
74
+ [[support.signal]].
75
 
76
  ``` cpp
77
  static constexpr T min() noexcept;
78
  ```
79
 
80
  Minimum finite value.[^3]
81
 
82
+ For floating-point types with subnormal numbers, returns the minimum
83
+ positive normalized value.
84
 
85
  Meaningful for all specializations in which `is_bounded != false`, or
86
  `is_bounded == false && is_signed == false`.
87
 
88
  ``` cpp
 
158
 
159
  ``` cpp
160
  static constexpr int radix;
161
  ```
162
 
163
+ For floating-point types, specifies the base or radix of the exponent
164
  representation (often 2).[^8]
165
 
166
  For integer types, specifies the base of the representation.[^9]
167
 
168
  Meaningful for all specializations.
 
319
  static constexpr bool is_bounded;
320
  ```
321
 
322
  `true` if the set of values representable by the type is finite.[^25]
323
 
324
+ [*Note 1*: All fundamental types [[basic.fundamental]] are bounded.
325
  This member would be `false` for arbitrary precision
326
  types. — *end note*]
327
 
328
  Meaningful for all specializations.
329
 
 
336
  would fall outside the range \[`min()`, `max()`\], the value returned
337
  differs from the true value by an integer multiple of
338
  `max() - min() + 1`.
339
 
340
  [*Example 1*: `is_modulo` is `false` for signed integer
341
+ types [[basic.fundamental]] unless an implementation, as an extension to
342
+ this document, defines signed integer overflow to
343
  wrap. — *end example*]
344
 
345
  Meaningful for all specializations.
346
 
347
  ``` cpp
348
  static constexpr bool traps;
349
  ```
350
 
351
+ `true` if, at the start of the program, there exists a value of the type
352
+ that would cause an arithmetic operation using that value to trap.[^27]
353
 
354
  Meaningful for all specializations.
355
 
356
  ``` cpp
357
  static constexpr bool tinyness_before;