[Edit removed during grace period]
Source Link
Joel Coehoorn
  • 376.4k
  • 109
  • 542
  • 777
added 32 characters in body
Source Link
Joel Coehoorn
  • 376.4k
  • 109
  • 542
  • 777

It's broken in the exact same way the decimal (base-10) notation you learned in grade school is broken, just for base-2.

To understand, think about representing 1/3 as a decimal value. It's impossible to do exactly! In the same way, 1/10 (decimal 0.1) cannot be represented exactly in base 2 (binary) as a "decimal" value; a repeating pattern after the decimal point goes on forever. The value is not exact, and therefore you can't do exact math with it using normal floating point methods.

It's broken in the exact same way decimal (base-10) notation is broken, just for base-2.

To understand, think about representing 1/3 as a decimal value. It's impossible to do exactly! In the same way, 1/10 (decimal 0.1) cannot be represented exactly in base 2 (binary) as a "decimal" value; a repeating pattern after the decimal point goes on forever. The value is not exact, and therefore you can't do exact math with it using normal floating point methods.

It's broken in the exact same way the decimal (base-10) notation you learned in grade school is broken, just for base-2.

To understand, think about representing 1/3 as a decimal value. It's impossible to do exactly! In the same way, 1/10 (decimal 0.1) cannot be represented exactly in base 2 (binary) as a "decimal" value; a repeating pattern after the decimal point goes on forever. The value is not exact, and therefore you can't do exact math with it using normal floating point methods.

added 3 characters in body
Source Link
Joel Coehoorn
  • 376.4k
  • 109
  • 542
  • 777

It's broken in the exact same way decimal (base-10) notation is broken, just for base-2.

To understand, try to convertthink about representing 1/3 toas a decimal value. It's impossible to representdo exactly! In the same way, 0.1 or 1/10 (decimal 0.1) cannot be represented exactly in base 2 (binary); you get as a "decimal" value; a repeating pattern after the decimal point that goes on forever. The value is not exact, and therefore you can't do exact math with it using normal floating point methods.

It's broken in the exact same way decimal (base-10) notation is broken, just for base-2.

To understand, try to convert 1/3 to a decimal value. It's impossible to represent exactly! In the same way, 0.1 or 1/10 cannot be represented exactly in base 2 (binary); you get a repeating pattern after the decimal point that goes on forever. The value is not exact, and therefore you can't do exact math with it using normal floating point methods.

It's broken in the exact same way decimal (base-10) notation is broken, just for base-2.

To understand, think about representing 1/3 as a decimal value. It's impossible to do exactly! In the same way, 1/10 (decimal 0.1) cannot be represented exactly in base 2 (binary) as a "decimal" value; a repeating pattern after the decimal point goes on forever. The value is not exact, and therefore you can't do exact math with it using normal floating point methods.

added 92 characters in body
Source Link
Joel Coehoorn
  • 376.4k
  • 109
  • 542
  • 777
Loading
added 38 characters in body
Source Link
Joel Coehoorn
  • 376.4k
  • 109
  • 542
  • 777
Loading
Source Link
Joel Coehoorn
  • 376.4k
  • 109
  • 542
  • 777
Loading