0.1 + 0.2 is not 0.3 in Python. Here Is Why!
Knowing How Python Deals With Numbers Will Help You Prevent Massive (But Unknown) Blunders
Let’s start with a simple comparison in Python.
0.1 + 0.2 == 0.3
What do you think this will result in?
You don’t have to be a mathematical prodigy to tell that the result is True
.
But is it?
Keep reading with a 7-day free trial
Subscribe to Into AI to keep reading this post and get 7 days of free access to the full post archives.