---
title: "Discussion on \"Why Does 0.1 + 0.2 Not Equal 0.3? The Floating-Point Surprise Every Beginner Meets\" | Hashnode"
description: "Discussion on \"Why Does 0.1 + 0.2 Not Equal 0.3? The Floating-Point Surprise Every Beginner Meets\". To put it simply, 0.1 + 0.2 does not equal 0.3 on a computer because computers store decimal numbers in binary, and 0.1 cannot be written exactly in binary. It is not a bug in your code. It is not a b"
url: "https://hashnode.com/posts/why-does-0-1-0-2-not-equal-0-3-the-floating-point-surprise-every-beginner-meets/6b0246091b06d668e4d52cda"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [Why Does 0.1 + 0.2 Not Equal 0.3? The Floating-Point Surprise Every Beginner Meets](https://itsmeminsithu.hashnode.dev/why-does-0-1-0-2-not-equal-0-3-the-floating-point-surprise-every-beginner-meets?utm_source=hashnode&utm_medium=feed)

To put it simply, 0.1 + 0.2 does not equal 0.3 on a computer because computers store decimal numbers in binary, and 0.1 cannot be written exactly in binary. It is not a bug in your code. It is not a b

Nov 22 · 7 min read · itsmeminsithu.hashnode.dev  
Read the article

-   [#floating-point](https://hashnode.com/tag/floating-point)
-   [#python](https://hashnode.com/tag/python)
-   [#beginners](https://hashnode.com/tag/beginners)
-   [#numbers](https://hashnode.com/tag/numbers)

## Written by

[Min SiThu](https://hashnode.com/@itsmeminsithu)

@itsmeminsithu · Singapore

  
[View profile](https://hashnode.com/@itsmeminsithu)

Software Engineer

Nubbad Developer. | Now I accidentally create problems.

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
