2 ms·
> If you write literals such as 0xa.bp-3, 1/3 or 22/7, why would those be allowed to throw out precision for speed? (That hex literal is valid C++17; the fracti
by lmm 5y ago
> If you write literals such as 0xa.bp-3, 1/3 or 22/7, why would those be allowed to throw out precision for speed? (That hex literal is valid C++17; the fractions aren’t literal in the standards, but IMO are literals in human heads)
IMO decimal rounding of those fractions, while not ideal, is a lot more understandable to a typical person. If 1/3 * 3 = 0.99999999999999999 that's annoying, but not crazy in the same way that the floating-point equivalent is.