Re:Why are there 5280 feet in a mile? (2009)
by billti on Monday August 31, 2020 @10:47AM
(#24331980)
Interesting to note that decimal fractions (e.g. 0.3) are awkward to represent with floats in computers, whereas fractions based on 1/2, 1/4, 1/8, etc. that are often used in the non-metric system are a very natural fit for the float representation.
[ Parent
| on HN ]
Re:Why are there 5280 feet in a mile? (2009)
by JdeBP on Monday August 31, 2020 @01:08PM
(#24333516)
But, conversely, converting 3 pounds to stones with floating point is not quite as natural. (-:
Re:Why are there 5280 feet in a mile? (2009)
by brianwawok on Monday August 31, 2020 @02:24PM
(#24334395)
But literally no one uses stones. People in UK when measuring weight of humans? I have never seen it in any other case. You don't buy things in the US by Stone.
Re:Why are there 5280 feet in a mile? (2009)
by JdeBP on Monday August 31, 2020 @02:38PM
(#24334572)
billti didn't say anything about who uses things, but you can enjoy how similarly unnatural binary floating point is for converting 8 inches into feet if you like, or 2 fluid ounces into U.K. pints.
Nothing stops you for using fractions with metric.
Re:Why are there 5280 feet in a mile? (2009)
by war1025 on Monday August 31, 2020 @12:10PM
(#24332827)
Nothing stops you from using decimal in Imperial :)
Re:Why are there 5280 feet in a mile? (2009)
by gspr on Tuesday September 01, 2020 @03:10PM
(#24345682)
True, but:
If you use decimal with metric, the units and prefixes play along with you very well (huge advantage). If you use other fractions with metric, you get no special bonus or burden (neutral).
If you use decimal with US customary ("imperial"), you get no special bonus or burden (netural). If you use other fractions with US customary, you get no special bonus or burden (neutral).
In summary, there is absolutely no rational reason to stick with US customary, besides legacy compatibility (technical debt).
Re:Why are there 5280 feet in a mile? (2009)
by ardacinar on Tuesday September 01, 2020 @10:09AM
(#24341850)
That would be a good point if the non-metric system we are discussing was based in binary. It's mostly (but not entirely) based around base-12 and uses 1/3 very commonly as a fraction (as well as 1/6). 1/3 and 1/6 does not have an exact floating point representation.