Skip to content

Commit 940c360

Browse files
committed
Add from_chars supporting current rounding mode to design decisions
Closes: #1115
1 parent 519dede commit 940c360

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

doc/modules/ROOT/pages/design.adoc

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,11 @@ The standard for <charconv> does not distinguish between underflow and overflow
6161
`boost::decimal::from_chars` modifies `value` in order to communicate this to the user in a divergence from the standard.
6262
This behavior is the same as that of https://www.boost.org/doc/libs/master/libs/charconv/doc/html/charconv.html#from_chars_usage_notes_for_from_chars_for_floating_point_types[`boost::charconv::from_chars_erange`].
6363

64+
=== `from_chars` Supports Rounding Mode
65+
66+
The pass:[C++] specification states that `from_chars` resulting value is to be rounded to nearest.
67+
Since the types in this library are more sensitive to rounding mode differences, `from_chars` rounds using the current global rounding mode as reported by `fegetround()`.
68+
6469
[#non-finite-deviation]
6570
=== `istream` of Non-finite Values is Allowed
6671

0 commit comments

Comments
 (0)