|
1 | 1 | --- |
2 | | -description: "Learn more about: <limits> enums" |
3 | 2 | title: "<limits> enums" |
4 | | -ms.date: "11/04/2016" |
| 3 | +description: "Learn more about: <limits> enums" |
| 4 | +ms.date: 11/04/2016 |
5 | 5 | f1_keywords: ["limits/std::float_denorm_style", "limits/std::float_round_style"] |
6 | | -ms.assetid: c86680a2-ba97-4ed9-8c20-a448857d7dc5 |
7 | 6 | --- |
8 | 7 | # `<limits>` enums |
9 | 8 |
|
10 | | -## <a name="float_denorm_style"></a> float_denorm_style |
| 9 | +The `<limits>` header provides the following enums: |
| 10 | + |
| 11 | +## <a name="float_denorm_style"></a> `float_denorm_style` |
11 | 12 |
|
12 | 13 | The enumeration describes the various methods that an implementation can choose for representing a denormalized floating-point value — one too small to represent as a normalized value: |
13 | 14 |
|
14 | 15 | ```cpp |
15 | | -enum float_denorm_style { |
| 16 | +enum float_denorm_style |
| 17 | +{ |
16 | 18 | denorm_indeterminate = -1, |
17 | 19 | denorm_absent = 0, |
18 | | - denorm_present = 1 }; |
| 20 | + denorm_present = 1 |
| 21 | +}; |
19 | 22 | ``` |
20 | 23 |
|
21 | 24 | ### Return Value |
22 | 25 |
|
23 | 26 | The enumeration returns: |
24 | 27 |
|
25 | 28 | - `denorm_indeterminate` if the presence or absence of denormalized forms cannot be determined at translation time. |
26 | | -
|
27 | 29 | - `denorm_absent` if denormalized forms are absent. |
28 | | -
|
29 | 30 | - `denorm_present` if denormalized forms are present. |
30 | 31 |
|
31 | 32 | ### Example |
32 | 33 |
|
33 | | -See [numeric_limits::has_denorm](../standard-library/numeric-limits-class.md#has_denorm) for an example in which the values of this enumeration may be accessed. |
| 34 | +See [`numeric_limits::has_denorm`](numeric-limits-class.md#has_denorm) for an example in which the values of this enumeration may be accessed. |
34 | 35 |
|
35 | | -## <a name="float_round_style"></a> float_round_style |
| 36 | +## <a name="float_round_style"></a> `float_round_style` |
36 | 37 |
|
37 | 38 | The enumeration describes the various methods that an implementation can choose for rounding a floating-point value to an integer value. |
38 | 39 |
|
39 | 40 | ```cpp |
40 | | -enum float_round_style { |
| 41 | +enum float_round_style |
| 42 | +{ |
41 | 43 | round_indeterminate = -1, |
42 | 44 | round_toward_zero = 0, |
43 | 45 | round_to_nearest = 1, |
44 | 46 | round_toward_infinity = 2, |
45 | | - round_toward_neg_infinity = 3 }; |
| 47 | + round_toward_neg_infinity = 3 |
| 48 | +}; |
46 | 49 | ``` |
47 | 50 |
|
48 | 51 | ### Return Value |
49 | 52 |
|
50 | 53 | The enumeration returns: |
51 | 54 |
|
52 | 55 | - `round_indeterminate` if the rounding method cannot be determined. |
53 | | - |
54 | 56 | - `round_toward_zero` if the round toward zero. |
55 | | - |
56 | 57 | - `round_to_nearest` if the round to nearest integer. |
57 | | - |
58 | 58 | - `round_toward_infinity` if the round away from zero. |
59 | | - |
60 | 59 | - `round_toward_neg_infinity` if the round to more negative integer. |
61 | 60 |
|
62 | 61 | ### Example |
63 | 62 |
|
64 | | -See [numeric_limits::round_style](../standard-library/numeric-limits-class.md#round_style) for an example in which the values of this enumeration may be accessed. |
| 63 | +See [`numeric_limits::round_style`](numeric-limits-class.md#round_style) for an example in which the values of this enumeration may be accessed. |
0 commit comments