In the tutorials, it said that python language cannot store decimals perfectly ,such as 1/3 as it "MAY LEAD TO INFURIATING BUGS" | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
- 1

In the tutorials, it said that python language cannot store decimals perfectly ,such as 1/3 as it "MAY LEAD TO INFURIATING BUGS"

How will this lead to bugs ?? can someone explain ?

11th Jun 2017, 3:51 PM
Canterville Ghost
Canterville Ghost - avatar
1 Answer
0
Generating a big decimal number, like for example Pi, will take a lot of power to get the exact number up to example 1000 numbers. If Python was trying to be exact it would open a gap in time, energy and memory, This makes an opportunity for bugs, or other programs to influence Python, making it less efficient. I might be wrong on this, but that would be my biggest worry as a programmer.
11th Jun 2017, 4:01 PM
Limitless
Limitless - avatar