tmp/tmp_ipx1nx5/{from.md → to.md}
RENAMED
|
@@ -0,0 +1,72 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#### General <a id="numeric.limits.general">[[numeric.limits.general]]</a>
|
| 2 |
+
|
| 3 |
+
The `numeric_limits` class template provides a C++ program with
|
| 4 |
+
information about various properties of the implementation’s
|
| 5 |
+
representation of the arithmetic types.
|
| 6 |
+
|
| 7 |
+
``` cpp
|
| 8 |
+
namespace std {
|
| 9 |
+
template<class T> class numeric_limits {
|
| 10 |
+
public:
|
| 11 |
+
static constexpr bool is_specialized = false;
|
| 12 |
+
static constexpr T min() noexcept { return T(); }
|
| 13 |
+
static constexpr T max() noexcept { return T(); }
|
| 14 |
+
static constexpr T lowest() noexcept { return T(); }
|
| 15 |
+
|
| 16 |
+
static constexpr int digits = 0;
|
| 17 |
+
static constexpr int digits10 = 0;
|
| 18 |
+
static constexpr int max_digits10 = 0;
|
| 19 |
+
static constexpr bool is_signed = false;
|
| 20 |
+
static constexpr bool is_integer = false;
|
| 21 |
+
static constexpr bool is_exact = false;
|
| 22 |
+
static constexpr int radix = 0;
|
| 23 |
+
static constexpr T epsilon() noexcept { return T(); }
|
| 24 |
+
static constexpr T round_error() noexcept { return T(); }
|
| 25 |
+
|
| 26 |
+
static constexpr int min_exponent = 0;
|
| 27 |
+
static constexpr int min_exponent10 = 0;
|
| 28 |
+
static constexpr int max_exponent = 0;
|
| 29 |
+
static constexpr int max_exponent10 = 0;
|
| 30 |
+
|
| 31 |
+
static constexpr bool has_infinity = false;
|
| 32 |
+
static constexpr bool has_quiet_NaN = false;
|
| 33 |
+
static constexpr bool has_signaling_NaN = false;
|
| 34 |
+
static constexpr T infinity() noexcept { return T(); }
|
| 35 |
+
static constexpr T quiet_NaN() noexcept { return T(); }
|
| 36 |
+
static constexpr T signaling_NaN() noexcept { return T(); }
|
| 37 |
+
static constexpr T denorm_min() noexcept { return T(); }
|
| 38 |
+
|
| 39 |
+
static constexpr bool is_iec559 = false;
|
| 40 |
+
static constexpr bool is_bounded = false;
|
| 41 |
+
static constexpr bool is_modulo = false;
|
| 42 |
+
|
| 43 |
+
static constexpr bool traps = false;
|
| 44 |
+
static constexpr bool tinyness_before = false;
|
| 45 |
+
static constexpr float_round_style round_style = round_toward_zero;
|
| 46 |
+
};
|
| 47 |
+
}
|
| 48 |
+
```
|
| 49 |
+
|
| 50 |
+
For all members declared `static` `constexpr` in the `numeric_limits`
|
| 51 |
+
template, specializations shall define these values in such a way that
|
| 52 |
+
they are usable as constant expressions.
|
| 53 |
+
|
| 54 |
+
For the `numeric_limits` primary template, all data members are
|
| 55 |
+
value-initialized and all member functions return a value-initialized
|
| 56 |
+
object.
|
| 57 |
+
|
| 58 |
+
[*Note 1*: This means all members have zero or `false` values unless
|
| 59 |
+
`numeric_limits` is specialized for a type. — *end note*]
|
| 60 |
+
|
| 61 |
+
Specializations shall be provided for each arithmetic type, both
|
| 62 |
+
floating-point and integer, including `bool`. The member
|
| 63 |
+
`is_specialized` shall be `true` for all such specializations of
|
| 64 |
+
`numeric_limits`.
|
| 65 |
+
|
| 66 |
+
The value of each member of a specialization of `numeric_limits` on a
|
| 67 |
+
cv-qualified type `cv T` shall be equal to the value of the
|
| 68 |
+
corresponding member of the specialization on the unqualified type `T`.
|
| 69 |
+
|
| 70 |
+
Non-arithmetic standard types, such as `complex<T>` [[complex]], shall
|
| 71 |
+
not have specializations.
|
| 72 |
+
|