Re:Python rounds float values by converting them to string a...
by mark-r on Wednesday August 28, 2019 @11:25AM
(#20820703)
The difference between decimal and binary is essential to understanding the problem. Just as there's no elegant way to represent 1/3 in base 10, there's no elegant way to represent 1/10 in base 2.
[ Parent
| on HN ]
Re:Python rounds float values by converting them to string a...
by chronolitus on Wednesday August 28, 2019 @11:50AM
(#20820972)
your comment led me to wonder why we commonly represent real numbers as floating-point in computing, and not, for example, as fractions.
https://retrocomputing.stackexchange.com/questions/7810/why-...