Into AI

Into AI

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
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?

This post is for paid subscribers

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