Re:Python rounds float values by converting them to string a...
by bloomer on Wednesday August 28, 2019 @11:05AM
(#20820494)
The definition that makes it unique is the shortest representation where trailing zeros are bout included. In your example that would be 1 note that this definition comes up in binary floating point where there are infinite decimal representations that will round back to a given binary64 float but the decimal representation chosen is the shortest (and closest to the binary64 float in the case of ties for length).
[ Parent
| on HN ]
There are no comments on this comment yet.