Raymond Hettinger added the comment:
Given that reliable checks aren't possible, it would still be nice (to have
flags suchas non_ieee754_detected and double_rounding_detected. If the flag is
False it provides no firm guarantees, but it if it is true, it is meaningful.
--
_
Mark Dickinson added the comment:
Double rounding is a property of how operations on floats are carried out,
rather than being a property of the float format itself; I'm not sure that it
belongs in float_info. It's also potentially ill-defined. Right now, as far as
I *know*, it seems to be t
Raymond Hettinger added the comment:
[Dong-hee Na]
> However, since the type is the structsequence the
> change can cause the ValueError: too many values
> to unpack when the variable is used as a tuple
Structseq also allows named fields that aren't part of the tuple. That is why
I suggest
Dong-hee Na added the comment:
@rhettinger
I like the idea to add more informative information,
However, since the type is the structsequence the change can cause the
ValueError: too many values to unpack when the variable is used as a tuple.
But the if such use case is not often used, it
New submission from Raymond Hettinger :
Consider adding new non-sequence fields to sys.float_info: doubling_rounding
and ieee_754.
The code in test_math defines a useful constant:
# detect evidence of double-rounding: fsum is not always correctly
# rounded on machines that suffer from d