4 ms·
Remember that one-bit errors aren't necessarily small errors. A single one bit change when working with 64 bit floating point can result in a very large differe
by todd8 9y ago
Remember that one-bit errors aren't necessarily small errors. A single one bit change when working with 64 bit floating point can result in a very large difference in value.
0b0111111111101111111111111111111111111111111111111111111111111111 == 1.7976931348623157e+308
0b0011111111101111111111111111111111111111111111111111111111111111 == 0.9999999999999999
- flamedoge 9y agoand potentially jump to a function that rm -rf /
- euroclydon 9y agoHow often doe a program load an FP with a value at the absolute extreme of the range though? I mean, if my value is there, I probably already have a problem.
- robotresearcher 9y agoThe highest bit is the sign bit. Flipping that one is interesting.
- todd8 9y agoYes, but the point is that flipping a single bit can change a value dramatically. While using 64 bit ints for example programs are likely using a limited range of values and flipping a bit in say the middle of the int will change the value by plus or minus 4294967296. Not many programs will handle this gracefully.