|
|
|
|
|
by derefr
1049 days ago
|
|
The best of both worlds, at least in my opinion, would be to write a float as a polynomial in two parts (where either part alone is still a float): an integer part with an optional scientific-notation exponent; and a fractional part, where the fraction's denominator is always a power of two. So 5e3 is a float; 3/8 is a float; and 5e3+3/8 is a float. Each cleanly and exactly representing particular IEEE754 values, while also being readable as a base-10 polynomials. Maybe fractions of arithmetically-specified powers of two could also be allowed, for really big denominators. 3/2**26, for example. |
|
Having to do any form of interpretation (even scientific notation is not ideal in some cases), is not great for many users.