---
title: "Discussion on \"0.1 + 0.2 Is Not a Bug. It's Arithmetic in a Costume.\" | Hashnode"
description: "Discussion on \"0.1 + 0.2 Is Not a Bug. It's Arithmetic in a Costume.\". 0.1 + 0.2 prints 0.30000000000000004 in Python and JavaScript alike. Real outputs from Python 3.12, why the extra 4 exists, and the 2 places it actually bites."
url: "https://hashnode.com/posts/0-1-0-2-is-not-a-bug-it-s-arithmetic-in-a-costume/6af730a9890855f53e058579"
---

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

Discussion

# [0.1 + 0.2 Is Not a Bug. It's Arithmetic in a Costume.](https://aheadkit.hashnode.dev/0-1-0-2-is-not-a-bug-it-s-arithmetic-in-a-costume?utm_source=hashnode&utm_medium=feed)

0.1 + 0.2 prints 0.30000000000000004 in Python and JavaScript alike. Real outputs from Python 3.12, why the extra 4 exists, and the 2 places it actually bites.

2d ago · 4 min read · aheadkit.hashnode.dev  
Read the article

-   [#programming-blogs](https://hashnode.com/tag/programming-blogs)
-   [#javascript](https://hashnode.com/tag/javascript)
-   [#python](https://hashnode.com/tag/python)

## Written by

[Abdus Salam](https://hashnode.com/@aheadkit)

@aheadkit

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

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
