Why can’t computers calculate decimals as floats properly?

236 views

Why can’t computers calculate decimals as floats properly?

In: 2

9 Answers

Anonymous 0 Comments

Most numbers are not possible to represent in a finite number of digits in the decimal form. 1/3 = 0.33333333333333333333333… repeating forever. In fact, there are a lot of (infinite amount) numbers that are such that they don’t have a regular pattern repeating, such as pi. For those numbers you would need infinite memory to write them down accurately, and since infinite memory cannot exist in real life, you need to compromise hard between being able to write numbers to a limited accuracy and buying a RAM stick the size of the planet to run Windows Calculator.

You are viewing 1 out of 9 answers, click here to view all answers.