Re:DEC64: Decimal Floating Point
by StefanKarpinski on Saturday March 08, 2014 @08:38PM
(#7367098)
That's not true – you could easily pick one of the 255 representations here as the representation and make sure that all operations always produce that one. Then you're still wasting a whole byte of your representation – and one in 255 bit patterns are invalid – but at least you can check for equality using bitwise comparison, and operations don't have to worry about all the possible representation of each value.
Re:DEC64: Decimal Floating Point
by StefanKarpinski on Sunday March 09, 2014 @11:49AM
(#7368718)
Correction: as was pointed out above, there isn't actually a whole byte of waste in this representation. It varies from 255 representations of zero, 17 of 10^-127, to only one representation of numbers that can't be shifted left or right without overflowing or losing bits.
Of course ... That's true of any decimal number representation with an exponent. Why is it a problem?