4 ms·
1. IEE754 floats are already nonlinear. The precision is the highest around zero. 2. Bitmap images are not using floating-point values, except in some super ni
by aaaaaaaaaaab 4y ago
1. IEE754 floats are already nonlinear. The precision is the highest around zero.
2. Bitmap images are not using floating-point values, except in some super niche use cases like GIS data, so “posits” are irrelevant for the use case you’ve posited. (ba-dum-ts)
3. Non-linear gamma is completely unnecessary for bit depths >= 16.
- CSSer 4y agoIf point 1 is true then why is 0.1 + 0.2 = 30000000000000004? Is that not close enough to zero? Edit: It seems I’m conflating “precision” with “accuracy”, which is a separate concept in math.
- throwawaymaths 4y agoThis is a problem for all number systems. The true issue here is not a precision in the underlying bit representation of IEEE-754, it's that 0.1 and 0.2 aren't actually a valid IEEE-754 numbers, and so they get casted to their best approximations.
- jcranmer 4y agoThat result happens for the same reason that 1 / 3 * 3 != 1, if you use decimal: 1 / 3 = .333, .333 * 3 = .999, which is different from 1.00. 0.1 is the same as 1 / 10, which does not have a finite representation in binary notation, just as 1 / 3 does not have a finite representation in binary or decimal notation.
- themerone 4y agoFloating point bitmaps are a lot more common than you think. A lot of consumers don't see them, but their software will internally use floats. Floating point bitmaps are standard practice in visual effects and animation. The OpenEXR format exists for the exchange of images with floating point bit depths up to 32.
- bXVsbGVy 4y agoPosit always have more precision than a IEEE floating with same number of bits because it has more bits for the mantissa. Posit would likely enable to better compression with Huffman encoding.