4 ms·
FWIW, both of those can be expressed exactly by floating-point numbers ;)
by umanwizard 7y ago
FWIW, both of those can be expressed exactly by floating-point numbers ;)
- IshKebab 7y agoRight all integers up to 2^53 (or something like that) can be (in double precision). I assume that's the reason they made the mantissa linear, even though having the whole thing logarithmic makes more sense.
- Iburinoc 7y agoAddition/subtraction are also much simpler/cheaper than they would be in an entirely logarithmic model. If floats were just 2^x with some 64 bit fixed point x, it's not clear to me how to do addition efficiently.
- nine_k 7y agoWhat. Mantissa is already logarithmic, bit number n has value 2^(n - N-1) for an N-bit mantissa. This is how positional number systems work at all.
- IshKebab 7y agoThe mantissa is linear. It's unrelated to how positional number systems work. A floating point value is split into two numbers - the exponent and the mantissa. Normally they are used to represent a final number like: x = 2^e * (1 + m) Where e is the exponent and m is the mantissa (varying linearly from 0 to 1). But you could have a fully exponential number format: x = 2^(m + o) As pointed out though, it makes addition much more complicated, you can't exactly represent integers, and someone told me it makes quantisation noise worse too. Bad idea.
- dang 7y agoWhew. I almost put some non-zeros in there.