Files
cppdraft_translate/cppdraft/round/style.md
2025-10-25 03:02:53 +03:00

43 lines
1.0 KiB
Markdown

[round.style]
# 17 Language support library [[support]](./#support)
## 17.3 Implementation properties [[support.limits]](support.limits#round.style)
### 17.3.4 Enum float_round_style [round.style]
[🔗](#lib:float_round_style)
namespace std {enum float_round_style { round_indeterminate = -1,
round_toward_zero = 0,
round_to_nearest = 1,
round_toward_infinity = 2,
round_toward_neg_infinity = 3};}
[1](#1)
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/support.tex#L968)
The rounding mode for floating-point arithmetic is characterized by the
values:
- [(1.1)](#1.1)
round_indeterminate if the rounding style is indeterminable
- [(1.2)](#1.2)
round_toward_zero if the rounding style is toward zero
- [(1.3)](#1.3)
round_to_nearest if the rounding style is to the nearest representable value
- [(1.4)](#1.4)
round_toward_infinity if the rounding style is toward infinity
- [(1.5)](#1.5)
round_toward_neg_infinity if the rounding style is toward negative infinity