2 ms·
Yes, that's a feature. I regard negative zero as a misfeature in most contexts. There might be some, where it's useful, but a general purpose datatype shouldn't
by GolDDranks 5y ago
Yes, that's a feature. I regard negative zero as a misfeature in most contexts. There might be some, where it's useful, but a general purpose datatype shouldn't be optimized for niche use cases.
There is no a real number called "negative zero". For extremely small-magnitude negative values, posits have more to offer than IEEE floats without the abomination that is known as denormal numbers. And for limits approaching zero, using a datatype that is supposed to represent a subset of rational numbers is the wrong tool for the job.