4 ms·
On a personal note, this representation annoys me: value = (-1) sign * 2 (exponent-127) * 1.fraction It should be: value = (-1) sign * 2 (exponent-127) * (1
by slivym 8y ago
On a personal note, this representation annoys me:
value = (-1) sign * 2 (exponent-127) * 1.fraction
It should be:
value = (-1) sign * 2 (exponent-127) * (1 + fraction*2^-23)
It sounds trivial, but you can't reason mathematically about the first equation.
- enriquto 8y agoI don't understand your concern, what's the point of the "1" in your representation for the mantissa?
- dbcurtis 8y agoI assume what you are saying is to assume a 1 in the MSB of the mantissa. That has been done. HP minicomputers, I believe, and maybe some orhers of that era. Unfortunately, that means that you have no way to represent numbers in the denormal binate, which leads to severe problems with monotonicity. As you move to binates with smaller exponents the distance between representable numbers halves in all the normalizable binates. Unless you allow for denormals, you have a GIANT jump from the smallest normalizable number to zero. This leads to problems in numerical algorithms. Taking differences to find slopes gets unstable as you approach convergence, causing converge to fail.
- Serow225 8y agoYeah, people that aren't deep into numerical algorithms often don't appreciate that there is an important reason to have denormals. The people who came up with the scheme weren't dumb, even though it has some limitations/oddities due to the time it was designed that would probably be done today, I think it's a pretty big design success that it has worked as well as it has for as long as it has.
- ruds 8y agoThe complaint is about the text in the article, which reads "The hardware interprets a float as having the value: value = (-1)^sign * 2^(exponent-127) * 1.fraction". "1.fraction" is nonsense that doesn't really mean anything, whereas (1 + fraction * 2^-23) does mean something.
- kevin_thibedeau 8y agoIt's just a different notation same as 1234 is shorthand for 1*10^4 + 2*10^3 + ...