Into AI

Into AI

Share this post

Into AI
Into AI
0.1 + 0.2 is not 0.3 in Python. Here Is Why!
Copy link
Facebook
Email
Notes
More

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

Dr. Ashish Bamania's avatar
Dr. Ashish Bamania
Oct 13, 2023
∙ Paid

Share this post

Into AI
Into AI
0.1 + 0.2 is not 0.3 in Python. Here Is Why!
Copy link
Facebook
Email
Notes
More
1
Share

Let’s start with a simple comparison in Python.

0.1 + 0.2 == 0.3

What do you think this will result in?

Byte Surgery is a reader-supported publication. To receive new posts and support my work, consider becoming a free or paid subscriber.

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.

Already a paid subscriber? Sign in
© 2025 Dr. Ashish Bamania
Privacy ∙ Terms ∙ Collection notice
Start writingGet the app
Substack is the home for great culture

Share

Copy link
Facebook
Email
Notes
More