Floating point from scratch: Hard Mode
30 points by ocramz
30 points by ocramz
Ooh, a nice little fact I don’t remember seeing before, at least not spelled out so clearly:
Now with subnormals in our system we inherit the following interesting property: for any floating point numbers x and y such that x != y, x - y is necessarily nonzero.
1.5 would be written as : 1 x 1 ×1.1000
Wouldn't this be 1.1?
read it in binary: 1 + 1×½ + 0×¼ + ...
I don't know how the read something like 1.1000 in binary and the text is less than helpful.
To make it clearer, consider a string with more significant figures, like 10.01.
Interpreted as decimal, we have:
Interpreted as binary, we have:
...for a total of 2.25 in decimal.