There are four cases that from_characters may need to handle
- parsing an exact subnormal result
- parsing an exact zero
- parsing an inexact subnormal result
- parsing an inexact zero
Underflow is signaled for both of the latter cases. It seems fairly clear that an exact subnormal result should be okay, otherwise the round-trip requirement of std::to_chars cannot be satisfied. Exact zero is obviously fine as well.
If both latter cases result in from_characters_status::floating_underflow, it would seem reasonable that the subnormal result is not flushed to zero, so that the user can obtain the value for diagnostic purposes. However, it's not obvious whether this is (easily) implementable.
There are four cases that
from_charactersmay need to handleUnderflow is signaled for both of the latter cases. It seems fairly clear that an exact subnormal result should be okay, otherwise the round-trip requirement of
std::to_charscannot be satisfied. Exact zero is obviously fine as well.If both latter cases result in
from_characters_status::floating_underflow, it would seem reasonable that the subnormal result is not flushed to zero, so that the user can obtain the value for diagnostic purposes. However, it's not obvious whether this is (easily) implementable.